diff --git a/models/data_hubs/fact_daily_app_datahub.sql b/models/data_hubs/fact_daily_app_datahub.sql index 8e99b371..edad5745 100644 --- a/models/data_hubs/fact_daily_app_datahub.sql +++ b/models/data_hubs/fact_daily_app_datahub.sql @@ -25,7 +25,6 @@ with ref("fact_pancakeswap_ethereum_gold"), ref("fact_apex_trading_volume_gold"), ref("fact_spark_ethereum_borrows_deposits_gold"), - ref("fact_seamless_protocol_base_borrows_deposits_gold"), ref("fact_uwu_lend_ethereum_borrows_deposits_gold"), ref("fact_aevo_trading_volume_gold"), ref("fact_sonne_optimism_borrows_deposits_gold"), diff --git a/models/projects/seamless/core/ez_seamless_metrics_by_chain.sql b/models/projects/seamless/core/ez_seamless_metrics_by_chain.sql new file mode 100644 index 00000000..3082f251 --- /dev/null +++ b/models/projects/seamless/core/ez_seamless_metrics_by_chain.sql @@ -0,0 +1,29 @@ +{{ + config( + materialized="table", + snowflake_warehouse="SEAMLESS", + database="seamless", + schema="core", + alias="ez_metrics_by_chain", + ) +}} + +with + seamless_by_chain as ( + {{ + dbt_utils.union_relations( + relations=[ + ref("fact_seamless_protocol_base_borrows_deposits_gold"), + ], + ) + }} + ) +select + seamless_by_chain.date, + 'seamless' as app, + 'DeFi' as category, + seamless_by_chain.chain, + seamless_by_chain.daily_borrows_usd, + seamless_by_chain.daily_supply_usd +from seamless_by_chain +where seamless_by_chain.date < to_date(sysdate()) \ No newline at end of file diff --git a/models/staging/seamless/fact_seamless_protocol_base_borrows_deposits.sql b/models/staging/seamless/fact_seamless_protocol_base_borrows_deposits.sql index 5f83acca..f51062f9 100644 --- a/models/staging/seamless/fact_seamless_protocol_base_borrows_deposits.sql +++ b/models/staging/seamless/fact_seamless_protocol_base_borrows_deposits.sql @@ -1,4 +1,4 @@ -{{ config(materialized="table") }} +{{ config(materialized="table", snowflake_warehouse="SEAMLESS") }} {{ fact_aave_fork_lending( "raw_seamless_protocol_base_borrows_deposits", "base", "seamlessprotocol" diff --git a/models/staging/seamless/fact_seamless_protocol_base_borrows_deposits_gold.sql b/models/staging/seamless/fact_seamless_protocol_base_borrows_deposits_gold.sql index 735efaad..1883c7c1 100644 --- a/models/staging/seamless/fact_seamless_protocol_base_borrows_deposits_gold.sql +++ b/models/staging/seamless/fact_seamless_protocol_base_borrows_deposits_gold.sql @@ -1,4 +1,4 @@ -{{ config(materialized="table") }} +{{ config(materialized="table", snowflake_warehouse="SEAMLESS") }} select date, chain,