From b60960e951cce5dde5cc9769606efa522b87eaaf Mon Sep 17 00:00:00 2001 From: Son Do Date: Wed, 17 Apr 2024 15:59:50 -0400 Subject: [PATCH 1/2] Fixed Maverick Friendly Name --- macros/transform/fact_protocol_daa_txns_gas_gas_usd.sql | 3 ++- .../maverick/fact_maverick_daa_txns_gas_gas_usd_base.sql | 2 +- .../maverick/fact_maverick_daa_txns_gas_gas_usd_bsc.sql | 2 +- .../maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum.sql | 2 +- .../fact_maverick_daa_txns_gas_gas_usd_ethereum_gold.sql | 2 +- .../maverick/fact_maverick_daa_txns_gas_gas_usd_zksync.sql | 1 + .../fact_maverick_daa_txns_gas_gas_usd_zksync_gold.sql | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/macros/transform/fact_protocol_daa_txns_gas_gas_usd.sql b/macros/transform/fact_protocol_daa_txns_gas_gas_usd.sql index e9a885a9..3f4a2e85 100644 --- a/macros/transform/fact_protocol_daa_txns_gas_gas_usd.sql +++ b/macros/transform/fact_protocol_daa_txns_gas_gas_usd.sql @@ -1,10 +1,11 @@ {% macro fact_protocol_daa_txns_gas_gas_usd( - chain, app, category, dim_protocol_addresses + chain, app, friendly_name, category, dim_protocol_addresses ) %} select date, '{{ chain }}' as chain, '{{ app }}' as app, + '{{friendly_name}}' as friendly_name, '{{ category }}' as category, count(distinct tx_hash) as txns, count(distinct from_address) as daa, diff --git a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_base.sql b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_base.sql index e0c7e7f9..0d54d9b5 100644 --- a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_base.sql +++ b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_base.sql @@ -14,6 +14,6 @@ with {{ fact_protocol_daa_txns_gas_gas_usd( - "base", "maverick_protocol", "DeFi", "dim_protocol_addresses" + "base", "maverick_protocol", "Maverick Protocol", "DeFi", "dim_protocol_addresses" ) }} diff --git a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_bsc.sql b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_bsc.sql index c4adac58..248284ec 100644 --- a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_bsc.sql +++ b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_bsc.sql @@ -12,6 +12,6 @@ with {{ fact_protocol_daa_txns_gas_gas_usd( - "bsc", "maverick_protocol", "DeFi", "dim_protocol_addresses" + "bsc", "maverick_protocol", "Maverick Protocol", "DeFi", "dim_protocol_addresses" ) }} diff --git a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum.sql b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum.sql index 6d8f4bf3..13aabf6a 100644 --- a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum.sql +++ b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum.sql @@ -14,6 +14,6 @@ with {{ fact_protocol_daa_txns_gas_gas_usd( - "ethereum", "maverick_protocol", "DeFi", "dim_protocol_addresses" + "ethereum", "maverick_protocol", "Maverick Protocol", "DeFi", "dim_protocol_addresses" ) }} diff --git a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum_gold.sql b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum_gold.sql index 5def908b..1de7368c 100644 --- a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum_gold.sql +++ b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum_gold.sql @@ -4,5 +4,5 @@ ) }} -select date, app, chain, daa, txns, gas, gas_usd +select date, app, 'Maverick Protocol' as friendly_name, chain, daa, txns, gas, gas_usd from {{ ref("fact_maverick_daa_txns_gas_gas_usd_ethereum") }} diff --git a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_zksync.sql b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_zksync.sql index f4c697b8..c3e8384d 100644 --- a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_zksync.sql +++ b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_zksync.sql @@ -60,6 +60,7 @@ select date, 'zksync' as chain, 'maverick_protocol' as app, + 'Maverick Protocol' as friendly_name, 'DeFi' as category, count(distinct tx_hash) as txns, count(distinct from_address) as daa, diff --git a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_zksync_gold.sql b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_zksync_gold.sql index 59784fa1..e25571ae 100644 --- a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_zksync_gold.sql +++ b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_zksync_gold.sql @@ -4,5 +4,5 @@ ) }} -select date, app, chain, daa, txns, gas, gas_usd +select date, app, friendly_name, chain, daa, txns, gas, gas_usd from {{ ref("fact_maverick_daa_txns_gas_gas_usd_zksync") }} From 32fce19d6b9e2edf68c17c30e0cfbaba122651db Mon Sep 17 00:00:00 2001 From: Son Do Date: Wed, 17 Apr 2024 16:58:49 -0400 Subject: [PATCH 2/2] Added Friendly to gold tables --- .../maverick/fact_maverick_daa_txns_gas_gas_usd_base_gold.sql | 2 +- .../maverick/fact_maverick_daa_txns_gas_gas_usd_bsc_gold.sql | 2 +- .../fact_maverick_daa_txns_gas_gas_usd_ethereum_gold.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_base_gold.sql b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_base_gold.sql index 6c084e2b..b97e6b00 100644 --- a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_base_gold.sql +++ b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_base_gold.sql @@ -4,5 +4,5 @@ ) }} -select date, app, chain, daa, txns, gas, gas_usd +select date, app, friendly_name, chain, daa, txns, gas, gas_usd from {{ ref("fact_maverick_daa_txns_gas_gas_usd_base") }} diff --git a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_bsc_gold.sql b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_bsc_gold.sql index b48a2fc8..42517c10 100644 --- a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_bsc_gold.sql +++ b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_bsc_gold.sql @@ -4,5 +4,5 @@ ) }} -select date, app, chain, daa, txns, gas, gas_usd +select date, app, friendly_name, chain, daa, txns, gas, gas_usd from {{ ref("fact_maverick_daa_txns_gas_gas_usd_bsc") }} diff --git a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum_gold.sql b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum_gold.sql index 1de7368c..0f76e0a0 100644 --- a/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum_gold.sql +++ b/models/staging/maverick/fact_maverick_daa_txns_gas_gas_usd_ethereum_gold.sql @@ -4,5 +4,5 @@ ) }} -select date, app, 'Maverick Protocol' as friendly_name, chain, daa, txns, gas, gas_usd +select date, app, friendly_name, chain, daa, txns, gas, gas_usd from {{ ref("fact_maverick_daa_txns_gas_gas_usd_ethereum") }}