-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 1227-init-corn
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
dbt_subprojects/hourly_spellbook/models/_sector/dune/_schema.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,24 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: dune_blockchains | ||
meta: | ||
sector: dune | ||
contributors: 0xRob | ||
description: > | ||
Core table listing blockchains on Dune with meta info | ||
columns: | ||
- name: name | ||
description: "The namespaces of the blockchain as used on Dune" | ||
- name: chain_id | ||
description: "The chain ID (only for EVM)" | ||
- name: display_name | ||
description: "Nicely formatted name" | ||
- name: protocol | ||
description: "evm or non_evm" | ||
- name: token_address | ||
description: "The token address used on Dune to represent the native token" | ||
- name: token_symbol | ||
description: "The token symbol of the native token" | ||
- name: token_decimals | ||
description: "The token decimals of the native token" |
15 changes: 15 additions & 0 deletions
15
dbt_subprojects/hourly_spellbook/models/_sector/dune/dune_blockchains.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,15 @@ | ||
{{ config( | ||
schema='dune', | ||
alias = 'blockchains', | ||
materialized = 'view', | ||
post_hook='{{ expose_spells(\'["dune"]\', | ||
"sector", | ||
"dune", | ||
\'["0xRob"]\') }}') | ||
}} | ||
|
||
-- because the graphql endpoint often returns http error 403 when querying through http_get(), | ||
-- we store the results in a matview instead and expose that one here with a view on top. | ||
-- matview: https://dune.com/queries/4467416 | ||
select * from | ||
{{ source("dune", "result_blockchains", database="dune") }} |
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,6 @@ | ||
version: 2 | ||
|
||
sources: | ||
- name: dune | ||
tables: | ||
- name: result_blockchains |