From f03ca3eb58f825652866d704b20b091284f66a58 Mon Sep 17 00:00:00 2001 From: Son Do <34179343+Sunny77D@users.noreply.github.com> Date: Tue, 3 Sep 2024 16:54:08 -0400 Subject: [PATCH] Added Defillama as its own project (#459) --- databases.csv | 1 + .../core/ez_defillama_metrics_by_chains.sql | 17 +++++++++++++++++ .../core/ez_defillama_metrics_by_protocols.sql | 17 +++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 models/projects/defillama/core/ez_defillama_metrics_by_chains.sql create mode 100644 models/projects/defillama/core/ez_defillama_metrics_by_protocols.sql diff --git a/databases.csv b/databases.csv index 65ec2505..7d7f4361 100644 --- a/databases.csv +++ b/databases.csv @@ -35,6 +35,7 @@ CREAL CUSD DAI DEXALOT +DEFILLAMA DFK EIGENPIE ETHEREUM diff --git a/models/projects/defillama/core/ez_defillama_metrics_by_chains.sql b/models/projects/defillama/core/ez_defillama_metrics_by_chains.sql new file mode 100644 index 00000000..f2743772 --- /dev/null +++ b/models/projects/defillama/core/ez_defillama_metrics_by_chains.sql @@ -0,0 +1,17 @@ +{{ + config( + materialized="table", + snowflake_warehouse="defillama", + database="defillama", + schema="core", + alias="ez_defillama_metrics_by_chains", + ) +}} + +select + date, + defillama_chain_name as chain, + dex_volumes, + tvl +from {{ref("agg_defillama_chain_fees_rev_tvl_dex_vol")}} +where date is not null diff --git a/models/projects/defillama/core/ez_defillama_metrics_by_protocols.sql b/models/projects/defillama/core/ez_defillama_metrics_by_protocols.sql new file mode 100644 index 00000000..85bf32c7 --- /dev/null +++ b/models/projects/defillama/core/ez_defillama_metrics_by_protocols.sql @@ -0,0 +1,17 @@ +{{ + config( + materialized="table", + snowflake_warehouse="defillama", + database="defillama", + schema="core", + alias="ez_defillama_metrics_by_protocols", + ) +}} + +select + date, + name, + dex_volumes, + tvl +from {{ref("agg_defillama_protocol_fees_rev_tvl_dex_vol")}} +where date is not null