Skip to content

Commit

Permalink
feat(dbt): add EAS source and staging model (#2322)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccerv1 authored Oct 7, 2024
1 parent 4d3c3ef commit 369d9d6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions warehouse/dbt/models/ethereum_attestation_service_sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sources:
- name: ethereum_attestation_service_optimism
database: opensource-observer
schema: ethereum_attestation_service_optimism
tables:
- name: attestations
identifier: attestations
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
select
id,
attester,
recipient,
ref_uid,
schema_id,
decoded_data_json,
revocable,
revoked,
is_offchain,
txid as transaction_hash,
timestamp_seconds(`time`) as `time`,
case
when expiration_time != 0 then timestamp_seconds(expiration_time)
end as expiration_time,
case
when revocation_time != 0 then timestamp_seconds(revocation_time)
end as revocation_time
from {{ source("ethereum_attestation_service_optimism", "attestations") }}

0 comments on commit 369d9d6

Please sign in to comment.