diff --git a/macros/metrics/get_p2p_metrics.sql b/macros/metrics/get_p2p_metrics.sql index 31debc22..7503514a 100644 --- a/macros/metrics/get_p2p_metrics.sql +++ b/macros/metrics/get_p2p_metrics.sql @@ -1,4 +1,8 @@ {% macro get_p2p_metrics(chain) %} - select date, p2p_native_transfer_volume, p2p_token_transfer_volume, p2p_stablecoin_transfer_volume, p2p_transfer_volume + select + date + , p2p_native_transfer_volume + , p2p_token_transfer_volume + , p2p_transfer_volume from {{ ref("fact_" ~ chain ~ "_p2p_transfer_volume") }} {% endmacro %} diff --git a/macros/metrics/get_stablecoin_metrics.sql b/macros/metrics/get_stablecoin_metrics.sql index 506efa09..ae704797 100644 --- a/macros/metrics/get_stablecoin_metrics.sql +++ b/macros/metrics/get_stablecoin_metrics.sql @@ -1,12 +1,59 @@ -{% macro get_stablecoin_metrics(chain) %} +{% macro get_stablecoin_metrics(identifier, breakdown="chain") %} +with mau as ( select - chain, - date, - sum(total_supply) as stablecoin_total_supply, - sum(txns) as stablecoin_txns, - sum(dau) as stablecoin_dau, - sum(transfer_volume) as stablecoin_transfer_volume, - sum(deduped_transfer_volume) as deduped_stablecoin_transfer_volume - from {{ ref("agg_" ~ chain ~ "_stablecoin_metrics") }} - group by chain, date -{% endmacro %} + date_granularity as date + , '{{ identifier }}' as {{breakdown}} + , stablecoin_dau as stablecoin_mau + , artemis_stablecoin_dau as artemis_stablecoin_mau + , p2p_stablecoin_dau as p2p_stablecoin_mau + from {{ ref("agg_monthly_stablecoin_breakdown_" ~ breakdown) }} + {% if breakdown == "chain" %} + where lower(chain) = lower('{{ identifier }}') + {% elif breakdown == "symbol" %} + where lower(symbol) = lower('{{ identifier }}') + {% endif %} +) +, daily_metrics as ( + select + date_granularity as date + , '{{ identifier }}' as {{ breakdown }} + + , stablecoin_transfer_volume as stablecoin_transfer_volume + , stablecoin_daily_txns as stablecoin_txns + , stablecoin_dau + + , artemis_stablecoin_transfer_volume + , artemis_stablecoin_daily_txns as artemis_stablecoin_txns + , artemis_stablecoin_dau + + , p2p_stablecoin_transfer_volume + , p2p_stablecoin_daily_txns as p2p_stablecoin_txns + , p2p_stablecoin_dau + + , stablecoin_supply as stablecoin_total_supply + from {{ ref("agg_daily_stablecoin_breakdown_" ~ breakdown) }} + {% if breakdown == "chain" %} + where lower(chain) = lower('{{ identifier }}') + {% elif breakdown == "symbol" %} + where lower(symbol) = lower('{{ identifier }}') + {% endif %} +) +select + daily_metrics.date + , daily_metrics.{{breakdown}} as {{ breakdown }} + , stablecoin_transfer_volume + , stablecoin_txns + , stablecoin_dau + , stablecoin_mau + , artemis_stablecoin_transfer_volume + , artemis_stablecoin_txns + , artemis_stablecoin_dau + , artemis_stablecoin_mau + , p2p_stablecoin_transfer_volume + , p2p_stablecoin_txns + , p2p_stablecoin_dau + , p2p_stablecoin_mau + , stablecoin_total_supply +from daily_metrics +left join mau on daily_metrics.date = mau.date +{% endmacro %} \ No newline at end of file diff --git a/macros/stablecoins/stablecoin_ez_metrics.sql b/macros/stablecoins/stablecoin_ez_metrics.sql deleted file mode 100644 index c8dd9b60..00000000 --- a/macros/stablecoins/stablecoin_ez_metrics.sql +++ /dev/null @@ -1,18 +0,0 @@ -{% macro get_stablecoin_ez_metrics(symbol) %} - -select - '{{ symbol }}' as symbol - , date - , sum(stablecoin_transfer_volume) as stablecoin_transfer_volume - , sum(artemis_stablecoin_transfer_volume) as deduped_stablecoin_transfer_volume - , count(distinct from_address) as stablecoin_dau - , sum(stablecoin_daily_txns) as stablecoin_txns - , sum(stablecoin_supply) as stablecoin_total_supply -from {{ ref("agg_daily_stablecoin_breakdown_silver") }} -where lower(symbol) = lower('{{ symbol }}') -{% if is_incremental() %} - and date >= (select dateadd('day', -3, max(date)) from {{ this }}) -{% endif %} -group by date - -{% endmacro %} diff --git a/models/projects/arbitrum/core/ez_arbitrum_metrics.sql b/models/projects/arbitrum/core/ez_arbitrum_metrics.sql index 64c2ee6a..0a00deec 100644 --- a/models/projects/arbitrum/core/ez_arbitrum_metrics.sql +++ b/models/projects/arbitrum/core/ez_arbitrum_metrics.sql @@ -58,14 +58,21 @@ select stablecoin_total_supply, stablecoin_txns, stablecoin_dau, + stablecoin_mau, stablecoin_transfer_volume, - deduped_stablecoin_transfer_volume, + artemis_stablecoin_txns, + artemis_stablecoin_dau, + artemis_stablecoin_mau, + artemis_stablecoin_transfer_volume, + p2p_stablecoin_txns, + p2p_stablecoin_dau, + p2p_stablecoin_mau, + p2p_stablecoin_transfer_volume, nft_trading_volume, p2p_native_transfer_volume, p2p_token_transfer_volume, - p2p_stablecoin_transfer_volume, p2p_transfer_volume, - coalesce(deduped_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, + coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume from fundamental_data left join price_data on fundamental_data.date = price_data.date diff --git a/models/projects/avalanche/core/ez_avalanche_metrics.sql b/models/projects/avalanche/core/ez_avalanche_metrics.sql index e57aed61..ace2c12c 100644 --- a/models/projects/avalanche/core/ez_avalanche_metrics.sql +++ b/models/projects/avalanche/core/ez_avalanche_metrics.sql @@ -59,17 +59,24 @@ select stablecoin_total_supply, stablecoin_txns, stablecoin_dau, + stablecoin_mau, stablecoin_transfer_volume, - deduped_stablecoin_transfer_volume, + artemis_stablecoin_txns, + artemis_stablecoin_dau, + artemis_stablecoin_mau, + artemis_stablecoin_transfer_volume, + p2p_stablecoin_txns, + p2p_stablecoin_dau, + p2p_stablecoin_mau, + p2p_stablecoin_transfer_volume, total_staked_native, total_staked_usd, issuance, nft_trading_volume, p2p_native_transfer_volume, p2p_token_transfer_volume, - p2p_stablecoin_transfer_volume, p2p_transfer_volume, - coalesce(deduped_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, + coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume from staking_data left join fundamental_data on staking_data.date = fundamental_data.date diff --git a/models/projects/base/core/ez_base_metrics.sql b/models/projects/base/core/ez_base_metrics.sql index f64f28e5..58afa2f8 100644 --- a/models/projects/base/core/ez_base_metrics.sql +++ b/models/projects/base/core/ez_base_metrics.sql @@ -49,14 +49,21 @@ select stablecoin_total_supply, stablecoin_txns, stablecoin_dau, + stablecoin_mau, stablecoin_transfer_volume, - deduped_stablecoin_transfer_volume, + artemis_stablecoin_txns, + artemis_stablecoin_dau, + artemis_stablecoin_mau, + artemis_stablecoin_transfer_volume, + p2p_stablecoin_txns, + p2p_stablecoin_dau, + p2p_stablecoin_mau, + p2p_stablecoin_transfer_volume, nft_trading_volume, p2p_native_transfer_volume, p2p_token_transfer_volume, - p2p_stablecoin_transfer_volume, p2p_transfer_volume, - coalesce(deduped_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, + coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume from fundamental_data left join defillama_data on fundamental_data.date = defillama_data.date diff --git a/models/projects/bsc/core/ez_bsc_metrics.sql b/models/projects/bsc/core/ez_bsc_metrics.sql index ed41e169..1b338eda 100644 --- a/models/projects/bsc/core/ez_bsc_metrics.sql +++ b/models/projects/bsc/core/ez_bsc_metrics.sql @@ -51,8 +51,16 @@ select stablecoin_total_supply, stablecoin_txns, stablecoin_dau, + stablecoin_mau, stablecoin_transfer_volume, - deduped_stablecoin_transfer_volume, + artemis_stablecoin_txns, + artemis_stablecoin_dau, + artemis_stablecoin_mau, + artemis_stablecoin_transfer_volume, + p2p_stablecoin_txns, + p2p_stablecoin_dau, + p2p_stablecoin_mau, + p2p_stablecoin_transfer_volume, nft_trading_volume from fundamental_data left join price_data on fundamental_data.date = price_data.date diff --git a/models/projects/busd/core/ez_busd_metrics.sql b/models/projects/busd/core/ez_busd_metrics.sql index 427d37c7..249cf04a 100644 --- a/models/projects/busd/core/ez_busd_metrics.sql +++ b/models/projects/busd/core/ez_busd_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="BUSD", database="busd", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("BUSD") }} +{{ get_stablecoin_metrics("BUSD", breakdown='symbol') }} diff --git a/models/projects/celo/core/ez_celo_metrics.sql b/models/projects/celo/core/ez_celo_metrics.sql index 1cf0a948..d11a728d 100644 --- a/models/projects/celo/core/ez_celo_metrics.sql +++ b/models/projects/celo/core/ez_celo_metrics.sql @@ -39,8 +39,16 @@ select stablecoin_total_supply, stablecoin_txns, stablecoin_dau, + stablecoin_mau, stablecoin_transfer_volume, - deduped_stablecoin_transfer_volume + artemis_stablecoin_txns, + artemis_stablecoin_dau, + artemis_stablecoin_mau, + artemis_stablecoin_transfer_volume, + p2p_stablecoin_txns, + p2p_stablecoin_dau, + p2p_stablecoin_mau, + p2p_stablecoin_transfer_volume, from fundamental_data left join price_data on fundamental_data.date = price_data.date left join defillama_data on fundamental_data.date = defillama_data.date diff --git a/models/projects/ceur/core/ez_ceur_metrics.sql b/models/projects/ceur/core/ez_ceur_metrics.sql index 6273d0fe..a8500b83 100644 --- a/models/projects/ceur/core/ez_ceur_metrics.sql +++ b/models/projects/ceur/core/ez_ceur_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="CEUR", database="ceur", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("CEUR") }} +{{ get_stablecoin_metrics("cEUR", breakdown='symbol') }} diff --git a/models/projects/ckes/core/ez_ckes_metrics.sql b/models/projects/ckes/core/ez_ckes_metrics.sql index dc4c4db1..1865390d 100644 --- a/models/projects/ckes/core/ez_ckes_metrics.sql +++ b/models/projects/ckes/core/ez_ckes_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="CKES", database="ckes", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("CKES") }} +{{ get_stablecoin_metrics("cKES", breakdown='symbol') }} diff --git a/models/projects/creal/core/ez_creal_metrics.sql b/models/projects/creal/core/ez_creal_metrics.sql index dd0bb2a2..923d27f1 100644 --- a/models/projects/creal/core/ez_creal_metrics.sql +++ b/models/projects/creal/core/ez_creal_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="CREAL", database="creal", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("CREAL") }} +{{ get_stablecoin_metrics("cREAL", breakdown='symbol') }} diff --git a/models/projects/cusd/core/ez_cusd_metrics.sql b/models/projects/cusd/core/ez_cusd_metrics.sql index d5699800..2e3c5ebb 100644 --- a/models/projects/cusd/core/ez_cusd_metrics.sql +++ b/models/projects/cusd/core/ez_cusd_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="CUSD", database="cusd", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("CUSD") }} +{{ get_stablecoin_metrics("cUSD", breakdown='symbol') }} diff --git a/models/projects/dai/core/ez_dai_metrics.sql b/models/projects/dai/core/ez_dai_metrics.sql index 460971cd..2c9ad84f 100644 --- a/models/projects/dai/core/ez_dai_metrics.sql +++ b/models/projects/dai/core/ez_dai_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="DAI", database="dai", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("DAI") }} +{{ get_stablecoin_metrics("DAI", breakdown='symbol') }} diff --git a/models/projects/ethereum/core/ez_ethereum_metrics.sql b/models/projects/ethereum/core/ez_ethereum_metrics.sql index 1c5ff9d9..b94ef7fd 100644 --- a/models/projects/ethereum/core/ez_ethereum_metrics.sql +++ b/models/projects/ethereum/core/ez_ethereum_metrics.sql @@ -72,11 +72,21 @@ select weekly_developers_sub_ecosystem, weekly_contracts_deployed, weekly_contract_deployers, + stablecoin_total_supply, stablecoin_txns, stablecoin_dau, + stablecoin_mau, stablecoin_transfer_volume, - deduped_stablecoin_transfer_volume, + artemis_stablecoin_txns, + artemis_stablecoin_dau, + artemis_stablecoin_mau, + artemis_stablecoin_transfer_volume, + p2p_stablecoin_txns, + p2p_stablecoin_dau, + p2p_stablecoin_mau, + p2p_stablecoin_transfer_volume, + censored_blocks, semi_censored_blocks, non_censored_blocks, @@ -92,9 +102,8 @@ select nft_trading_volume, p2p_native_transfer_volume, p2p_token_transfer_volume, - p2p_stablecoin_transfer_volume, p2p_transfer_volume, - coalesce(deduped_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, + coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume, blob_fees_native, blob_fees, diff --git a/models/projects/eurc/core/ez_eurc_metrics.sql b/models/projects/eurc/core/ez_eurc_metrics.sql index 18c8a663..cc76f60f 100644 --- a/models/projects/eurc/core/ez_eurc_metrics.sql +++ b/models/projects/eurc/core/ez_eurc_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="EURC", database="eurc", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("EURC") }} +{{ get_stablecoin_metrics("EURC", breakdown='symbol') }} diff --git a/models/projects/optimism/core/ez_optimism_metrics.sql b/models/projects/optimism/core/ez_optimism_metrics.sql index 5ba23abd..c63c081b 100644 --- a/models/projects/optimism/core/ez_optimism_metrics.sql +++ b/models/projects/optimism/core/ez_optimism_metrics.sql @@ -67,14 +67,21 @@ select stablecoin_total_supply, stablecoin_txns, stablecoin_dau, + stablecoin_mau, stablecoin_transfer_volume, - deduped_stablecoin_transfer_volume, + artemis_stablecoin_txns, + artemis_stablecoin_dau, + artemis_stablecoin_mau, + artemis_stablecoin_transfer_volume, + p2p_stablecoin_txns, + p2p_stablecoin_dau, + p2p_stablecoin_mau, + p2p_stablecoin_transfer_volume, nft_trading_volume, p2p_native_transfer_volume, p2p_token_transfer_volume, - p2p_stablecoin_transfer_volume, p2p_transfer_volume, - coalesce(deduped_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, + coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume from fundamental_data left join price_data on fundamental_data.date = price_data.date diff --git a/models/projects/polygon/core/ez_polygon_metrics.sql b/models/projects/polygon/core/ez_polygon_metrics.sql index 3af7ec66..f1605c4f 100644 --- a/models/projects/polygon/core/ez_polygon_metrics.sql +++ b/models/projects/polygon/core/ez_polygon_metrics.sql @@ -68,14 +68,21 @@ select stablecoin_total_supply, stablecoin_txns, stablecoin_dau, + stablecoin_mau, stablecoin_transfer_volume, - deduped_stablecoin_transfer_volume, + artemis_stablecoin_txns, + artemis_stablecoin_dau, + artemis_stablecoin_mau, + artemis_stablecoin_transfer_volume, + p2p_stablecoin_txns, + p2p_stablecoin_dau, + p2p_stablecoin_mau, + p2p_stablecoin_transfer_volume, nft_trading_volume, p2p_native_transfer_volume, p2p_token_transfer_volume, - p2p_stablecoin_transfer_volume, p2p_transfer_volume, - coalesce(deduped_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, + coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume from fundamental_data left join price_data on fundamental_data.date = price_data.date diff --git a/models/projects/pyusd/core/ez_pyusd_metrics.sql b/models/projects/pyusd/core/ez_pyusd_metrics.sql index ca04da2b..e56435f4 100644 --- a/models/projects/pyusd/core/ez_pyusd_metrics.sql +++ b/models/projects/pyusd/core/ez_pyusd_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="PYUSD", database="pyusd", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("PYUSD") }} +{{ get_stablecoin_metrics("PYUSD", breakdown='symbol') }} diff --git a/models/projects/solana/core/ez_solana_metrics.sql b/models/projects/solana/core/ez_solana_metrics.sql index b4c2cbf6..2afe60d6 100644 --- a/models/projects/solana/core/ez_solana_metrics.sql +++ b/models/projects/solana/core/ez_solana_metrics.sql @@ -166,15 +166,22 @@ select stablecoin_total_supply, stablecoin_txns, stablecoin_dau, + stablecoin_mau, stablecoin_transfer_volume, - deduped_stablecoin_transfer_volume, + artemis_stablecoin_txns, + artemis_stablecoin_dau, + artemis_stablecoin_mau, + artemis_stablecoin_transfer_volume, + p2p_stablecoin_txns, + p2p_stablecoin_dau, + p2p_stablecoin_mau, + p2p_stablecoin_transfer_volume, total_staked_native, total_staked_usd, issuance, nft_trading_volume, p2p_native_transfer_volume, p2p_token_transfer_volume, - p2p_stablecoin_transfer_volume, p2p_transfer_volume, coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume from fundamental_usage diff --git a/models/projects/ton/core/ez_ton_metrics.sql b/models/projects/ton/core/ez_ton_metrics.sql index 2a498241..9695541f 100644 --- a/models/projects/ton/core/ez_ton_metrics.sql +++ b/models/projects/ton/core/ez_ton_metrics.sql @@ -41,8 +41,16 @@ select stablecoin_total_supply, stablecoin_txns, stablecoin_dau, + stablecoin_mau, stablecoin_transfer_volume, - deduped_stablecoin_transfer_volume, + artemis_stablecoin_txns, + artemis_stablecoin_dau, + artemis_stablecoin_mau, + artemis_stablecoin_transfer_volume, + p2p_stablecoin_txns, + p2p_stablecoin_dau, + p2p_stablecoin_mau, + p2p_stablecoin_transfer_volume, price, market_cap, fdmc, diff --git a/models/projects/tron/core/ez_tron_metrics.sql b/models/projects/tron/core/ez_tron_metrics.sql index 0530192b..1e4c2e4a 100644 --- a/models/projects/tron/core/ez_tron_metrics.sql +++ b/models/projects/tron/core/ez_tron_metrics.sql @@ -48,13 +48,20 @@ select stablecoin_total_supply, stablecoin_txns, stablecoin_dau, + stablecoin_mau, stablecoin_transfer_volume, - deduped_stablecoin_transfer_volume, + artemis_stablecoin_txns, + artemis_stablecoin_dau, + artemis_stablecoin_mau, + artemis_stablecoin_transfer_volume, + p2p_stablecoin_txns, + p2p_stablecoin_dau, + p2p_stablecoin_mau, + p2p_stablecoin_transfer_volume, p2p_native_transfer_volume, p2p_token_transfer_volume, - p2p_stablecoin_transfer_volume, p2p_transfer_volume, - coalesce(deduped_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, + coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume, coalesce(dex_volumes, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume from fundamental_data left join price_data on fundamental_data.date = price_data.date diff --git a/models/projects/usdc/core/ez_usdc_metrics.sql b/models/projects/usdc/core/ez_usdc_metrics.sql index dd4357bf..ac28925c 100644 --- a/models/projects/usdc/core/ez_usdc_metrics.sql +++ b/models/projects/usdc/core/ez_usdc_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="USDC", database="usdc", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("USDC") }} +{{ get_stablecoin_metrics("USDC", breakdown='symbol') }} diff --git a/models/projects/usde/core/ez_usde_metrics.sql b/models/projects/usde/core/ez_usde_metrics.sql index 04d83293..9af90d96 100644 --- a/models/projects/usde/core/ez_usde_metrics.sql +++ b/models/projects/usde/core/ez_usde_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="USDE", database="usde", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("USDE") }} +{{ get_stablecoin_metrics("USDe", breakdown='symbol') }} diff --git a/models/projects/usdglo/core/ez_usdglo_metrics.sql b/models/projects/usdglo/core/ez_usdglo_metrics.sql index 002a6b81..51e2f896 100644 --- a/models/projects/usdglo/core/ez_usdglo_metrics.sql +++ b/models/projects/usdglo/core/ez_usdglo_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="USDGLO", database="usdglo", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("USDGLO") }} +{{ get_stablecoin_metrics("USDGLO", breakdown='symbol') }} diff --git a/models/projects/usdp/core/ez_usdp_metrics.sql b/models/projects/usdp/core/ez_usdp_metrics.sql index 733c1aba..257080f0 100644 --- a/models/projects/usdp/core/ez_usdp_metrics.sql +++ b/models/projects/usdp/core/ez_usdp_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="USDP", database="usdp", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("USDP") }} +{{ get_stablecoin_metrics("USDP", breakdown='symbol') }} diff --git a/models/projects/usdt/core/ez_usdt_metrics.sql b/models/projects/usdt/core/ez_usdt_metrics.sql index e12d1c58..9a12f899 100644 --- a/models/projects/usdt/core/ez_usdt_metrics.sql +++ b/models/projects/usdt/core/ez_usdt_metrics.sql @@ -1,7 +1,6 @@ {{ config( - materialized="incremental", - unique_key="date", + materialized="table", snowflake_warehouse="USDT", database="usdt", schema="core", @@ -9,4 +8,4 @@ ) }} -{{ get_stablecoin_ez_metrics("USDT") }} +{{ get_stablecoin_metrics("USDT", breakdown='symbol') }}