Skip to content

Commit

Permalink
Wes/icp duplicates fix (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwes authored Nov 12, 2024
1 parent 0a52b52 commit 8ddff35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ select
, dex_volumes
, 5 as storage_cost
from price_data
full join icp_metrics on price_data.date = icp_metrics.date
full join icp_blocks on price_data.date = icp_blocks.date
full join icp_total_canister_state on price_data.date = icp_total_canister_state.date
full join icp_neuron_funds on price_data.date = icp_neuron_funds.date
full join defillama_data on price_data.date = defillama_data.date
left join icp_metrics on price_data.date = icp_metrics.date
left join icp_blocks on price_data.date = icp_blocks.date
left join icp_total_canister_state on price_data.date = icp_total_canister_state.date
left join icp_neuron_funds on price_data.date = icp_neuron_funds.date
left join defillama_data on price_data.date = defillama_data.date
where coalesce(price_data.date, defillama_data.date, icp_metrics.date, icp_blocks.date, icp_total_canister_state.date, icp_neuron_funds.date) < to_date(sysdate())
{% if is_incremental() %}
and coalesce(price_data.date, defillama_data.date, icp_metrics.date, icp_total_canister_state.date, icp_neuron_funds.date, icp_blocks.date)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{
config(
materialized="table",
snowflake_warehouse="outerlands"
snowflake_warehouse="outerlands",
unique_key=["date", "artemis_id"]
)
}}

Expand Down

0 comments on commit 8ddff35

Please sign in to comment.