Skip to content

Commit

Permalink
Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
akan72 committed Jun 18, 2024
2 parents 7b46463 + 2603d19 commit cd21501
Show file tree
Hide file tree
Showing 15 changed files with 127 additions and 18 deletions.
5 changes: 0 additions & 5 deletions models/data_hubs/fact_daily_app_datahub.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ with
relations=[
ref("agg_daily_app_fundamental_usage"),
ref("fact_stargate_bridge_volume_gold"),
ref("fact_venus_lending_bsc_gold"),
ref("fact_sushiswap_arbitrum_gold"),
ref("fact_sushiswap_avalanche_gold"),
ref("fact_sushiswap_bsc_gold"),
Expand All @@ -24,13 +23,9 @@ with
ref("fact_pancakeswap_bsc_gold"),
ref("fact_pancakeswap_ethereum_gold"),
ref("fact_apex_trading_volume_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"),
ref("fact_sonne_base_borrows_deposits_gold"),
ref("fact_moonwell_base_borrows_deposits_gold"),
ref("fact_benqi_avalanche_borrows_deposits_gold"),
ref("fact_quickswap_polygon_gold"),
ref("fact_fraxswap_ethereum_gold"),
ref("fact_trader_joe_arbitrum_gold"),
Expand Down
29 changes: 29 additions & 0 deletions models/projects/benqi/core/ez_benqi_metrics_by_chain.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{
config(
materialized="table",
snowflake_warehouse="BENQI_FINANCE",
database="benqi_finance",
schema="core",
alias="ez_metrics_by_chain",
)
}}

with
benqi_by_chain as (
{{
dbt_utils.union_relations(
relations=[
ref("fact_benqi_avalanche_borrows_deposits_gold"),
],
)
}}
)
select
benqi_by_chain.date,
'benqi' as app,
'DeFi' as category,
benqi_by_chain.chain,
benqi_by_chain.daily_borrows_usd,
benqi_by_chain.daily_supply_usd
from benqi_by_chain
where benqi_by_chain.date < to_date(sysdate())
29 changes: 29 additions & 0 deletions models/projects/seamless/core/ez_seamless_metrics_by_chain.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{
config(
materialized="table",
snowflake_warehouse="SEAMLESSPROTOCOL",
database="seamlessprotocol",
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())
30 changes: 30 additions & 0 deletions models/projects/sonne/core/ez_sonne_metrics_by_chain.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{
config(
materialized="table",
snowflake_warehouse="SONNE_FINANCE",
database="sonne_finance",
schema="core",
alias="ez_metrics_by_chain",
)
}}

with
sonne_by_chain as (
{{
dbt_utils.union_relations(
relations=[
ref("fact_sonne_base_borrows_deposits_gold"),
ref("fact_sonne_optimism_borrows_deposits_gold"),
],
)
}}
)
select
sonne_by_chain.date,
'sonne' as app,
'DeFi' as category,
sonne_by_chain.chain,
sonne_by_chain.daily_borrows_usd,
sonne_by_chain.daily_supply_usd
from sonne_by_chain
where sonne_by_chain.date < to_date(sysdate())
29 changes: 29 additions & 0 deletions models/projects/venus/core/ez_venus_metrics_by_chain.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{
config(
materialized="table",
snowflake_warehouse="venus",
database="venus",
schema="core",
alias="ez_metrics_by_chain",
)
}}

with
venus_by_chain as (
{{
dbt_utils.union_relations(
relations=[
ref("fact_venus_v4_lending_bsc_gold"),
],
)
}}
)
select
venus_by_chain.date,
'venus' as app,
'DeFi' as category,
venus_by_chain.chain,
venus_by_chain.daily_borrows_usd,
venus_by_chain.daily_supply_usd
from venus_by_chain
where venus_by_chain.date < to_date(sysdate())
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(materialized="table") }}
{{ config(materialized="table", snowflake_warehouse="BENQI_FINANCE") }}
{{
fact_compound_v2_fork_lending(
"raw_benqi_avalanche_borrows_deposits", "avalanche", "benqi_finance"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{ config(materialized="table") }}
{{ config(materialized="table", snowflake_warehouse="BENQI_FINANCE") }}
select date, chain, app, category, daily_borrows_usd, daily_supply_usd
from {{ ref("fact_benqi_avalanche_borrows_deposits") }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(materialized="table") }}
{{ config(materialized="table", snowflake_warehouse="SEAMLESSPROTOCOL") }}
{{
fact_aave_fork_lending(
"raw_seamless_protocol_base_borrows_deposits", "base", "seamlessprotocol"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(materialized="table") }}
{{ config(materialized="table", snowflake_warehouse="SEAMLESSPROTOCOL") }}
select
date,
chain,
Expand Down
2 changes: 1 addition & 1 deletion models/staging/sonne/fact_sonne_base_borrows_deposits.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(materialized="table") }}
{{ config(materialized="table", snowflake_warehouse="SONNE_FINANCE") }}
{{
fact_compound_v2_fork_lending(
"raw_sonne_base_borrows_deposits", "base", "sonne_finance"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{ config(materialized="table") }}
{{ config(materialized="table", snowflake_warehouse="SONNE_FINANCE") }}
select date, chain, app, category, daily_borrows_usd, daily_supply_usd
from {{ ref("fact_sonne_base_borrows_deposits") }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(materialized="table") }}
{{ config(materialized="table", snowflake_warehouse="SONNE_FINANCE") }}
{{
fact_compound_v2_fork_lending(
"raw_sonne_optimism_borrows_deposits", "optimism", "sonne_finance"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{ config(materialized="table") }}
{{ config(materialized="table", snowflake_warehouse="SONNE_FINANCE") }}
select date, chain, app, category, daily_borrows_usd, daily_supply_usd
from {{ ref("fact_sonne_optimism_borrows_deposits") }}
3 changes: 0 additions & 3 deletions models/staging/venus/fact_venus_lending_bsc_gold.sql

This file was deleted.

4 changes: 2 additions & 2 deletions models/staging/venus/fact_venus_v4_lending_bsc_gold.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{ config(materialized="table") }}
select date, chain, app, category, daily_borrows_usd, daily_supply_usd
{{ config(materialized="table", snowflake_warehouse="VENUS") }}
select date, chain, 'venus' as app, category, daily_borrows_usd, daily_supply_usd
from {{ ref("fact_venus_v4_lending_bsc") }}

0 comments on commit cd21501

Please sign in to comment.