-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dbt): add EAS source and staging model (#2322)
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
warehouse/dbt/models/ethereum_attestation_service_sources.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
19 changes: 19 additions & 0 deletions
19
...odels/staging/ethereum_attestation_service/stg_ethereum_attestation_service__optimism.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") }} |