-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
creating new ez metrics tables (#183)
- Loading branch information
1 parent
29ca958
commit ed4e31b
Showing
16 changed files
with
187 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,36 @@ | ||
{{ | ||
config( | ||
materialized="table" | ||
, snowflake_warehouse="AXELAR" | ||
, database="axelar" | ||
, schema="core" | ||
, alias="ez_metrics" | ||
) | ||
}} | ||
|
||
with | ||
fundamental_data as ( | ||
select | ||
date | ||
, txns | ||
, daa as dau | ||
from {{ ref("fact_axelar_daa_txns") }} | ||
) | ||
, github_data as ({{ get_github_metrics("Axelar Network") }}) | ||
, price_data as ({{ get_coingecko_metrics("axelar") }}) | ||
select | ||
fundamental_data.date | ||
, 'axelar' as chain | ||
, txns | ||
, dau | ||
, weekly_commits_core_ecosystem | ||
, weekly_commits_sub_ecosystem | ||
, weekly_developers_core_ecosystem | ||
, weekly_developers_sub_ecosystem | ||
, price | ||
, market_cap | ||
, fdmc | ||
from fundamental_data | ||
left join github_data using (date) | ||
left join price_data using (date) | ||
where fundamental_data.date < to_date(sysdate()) |
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,50 @@ | ||
{{ | ||
config( | ||
materialized="table" | ||
, snowflake_warehouse="GNOSIS" | ||
, database="gnosis" | ||
, schema="core" | ||
, alias="ez_metrics" | ||
) | ||
}} | ||
|
||
|
||
with | ||
fundamental_data as ( | ||
select | ||
date | ||
, txns | ||
, daa as dau | ||
, gas_usd as fees | ||
, gas as fees_native | ||
, native_token_burn as revenue | ||
, revenue | ||
from {{ ref("fact_gnosis_daa_txns_gas_gas_usd") }} | ||
left join {{ ref("agg_daily_gnosis_revenue") }} using (date) | ||
) | ||
, github_data as ({{ get_github_metrics("gnosis") }}) | ||
, defillama_data as ({{ get_defillama_metrics("gnosis") }}) | ||
, price_data as ({{ get_coingecko_metrics("gnosis") }}) | ||
|
||
select | ||
fundamental_data.date | ||
, 'gnosis' as chain | ||
, txns | ||
, dau | ||
, fees | ||
, fees_native | ||
, revenue | ||
, revenue as revenue_native | ||
, weekly_commits_core_ecosystem | ||
, weekly_commits_sub_ecosystem | ||
, weekly_developers_core_ecosystem | ||
, weekly_developers_sub_ecosystem | ||
, dex_volumes | ||
, price | ||
, market_cap | ||
, fdmc | ||
from fundamental_data | ||
left join github_data using (date) | ||
left join defillama_data using (date) | ||
left join price_data using (date) | ||
where fundamental_data.date < to_date(sysdate()) |
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,51 @@ | ||
{{ | ||
config( | ||
materialized='table' | ||
, snowflake_warehouse='MANTLE' | ||
, database="mantle" | ||
, schema="core" | ||
, alias="ez_metrics" | ||
) | ||
}} | ||
|
||
|
||
with fundamental_data as ( | ||
select | ||
date | ||
, txns | ||
, daa as dau | ||
, gas_usd as fees | ||
, gas as fees_native | ||
, revenue | ||
, l1_data_cost | ||
, l1_data_cost_native | ||
from {{ ref("fact_mantle_daa_txns_gas_gas_usd_revenue") }} | ||
) | ||
, github_data as ({{ get_github_metrics("mantle") }}) | ||
, defillama_data as ({{ get_defillama_metrics("mantle") }}) | ||
, price_data as ({{ get_coingecko_metrics("mantle") }}) | ||
|
||
select | ||
fundamental_data.date | ||
, 'mantle' as chain | ||
, txns | ||
, dau | ||
, fees | ||
, fees_native | ||
, revenue | ||
, l1_data_cost | ||
, l1_data_cost_native | ||
, tvl | ||
, dex_volumes | ||
, weekly_commits_core_ecosystem | ||
, weekly_commits_sub_ecosystem | ||
, weekly_developers_core_ecosystem | ||
, weekly_developers_sub_ecosystem | ||
, price | ||
, market_cap | ||
, fdmc | ||
from fundamental_data | ||
left join github_data using (date) | ||
left join defillama_data using (date) | ||
left join price_data using (date) | ||
where fundamental_data.date < to_date(sysdate()) |
33 changes: 33 additions & 0 deletions
33
models/projects/parallel_finance/core/ez_parallel_finance_metrics.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,33 @@ | ||
{{ | ||
config( | ||
materialized="table" | ||
, snowflake_warehouse="PARALLEL_FINANCE" | ||
, database="parallel_finance" | ||
, schema="core" | ||
, alias="ez_metrics" | ||
) | ||
}} | ||
|
||
with | ||
fundamental_data as ( | ||
select | ||
date | ||
, txns | ||
, daa as dau | ||
, gas_usd as fees | ||
, gas as fees_native | ||
from {{ ref("fact_parallel_finance_daa_gas_gas_usd_txns") }} | ||
) | ||
, defillama_data as ({{ get_defillama_metrics("parallel") }}) | ||
|
||
select | ||
fundamental_data.date | ||
, 'parallel_finance' as chain | ||
, txns | ||
, dau | ||
, fees | ||
, fees_native | ||
, tvl | ||
from fundamental_data | ||
left join defillama_data using (date) | ||
where fundamental_data.date < to_date(sysdate()) |
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
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
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
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
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
2 changes: 1 addition & 1 deletion
2
models/staging/parallel_finance/fact_parallel_finance_daa_gas_gas_usd_txns.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
2 changes: 1 addition & 1 deletion
2
models/staging/parallel_finance/fact_parallel_finance_gas_gas_usd.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
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