-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ create
karmahq_details
model (#78)
* create karmahq attestations asset * create karmahq_details dbt model
- Loading branch information
1 parent
513b673
commit 901daca
Showing
3 changed files
with
75 additions
and
10 deletions.
There are no files selected for viewing
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,16 @@ | ||
with source as ( | ||
select * from {{ source('public', 'raw_karmahq_attestations') }} | ||
), | ||
|
||
renamed as ( | ||
select | ||
lower(attester) as attester, | ||
lower(recipient) as recipient, | ||
isOffchain as is_offchain, | ||
decodedDataJson as json, | ||
JSON_EXTRACT(decodedDataJson->>'$[0].value.value', '$.hash') as ipfs_cid, | ||
JSON_EXTRACT(decodedDataJson->>'$[0].value.value', '$.title') as title | ||
from source | ||
) | ||
|
||
select * from renamed |
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
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