Skip to content

Commit

Permalink
Revert "Fix token standard in transfers_base (duneanalytics#5212)" (d…
Browse files Browse the repository at this point in the history
…uneanalytics#5223)

This reverts commit 9e8c6e7.
  • Loading branch information
jeff-dude authored Jan 24, 2024
1 parent 9e8c6e7 commit c3a8e7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
12 changes: 2 additions & 10 deletions macros/models/_sector/tokens/transfers_base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WITH transfers AS (
, tx_hash
, cast(NULL as bigint) AS evt_index
, trace_address
{% if native_contract_address %}
{% if native_contract_address%}
, {{native_contract_address}} AS contract_address
{% else %}
, CAST(NULL AS varbinary) AS contract_address
Expand All @@ -34,15 +34,7 @@ WITH transfers AS (
, t.evt_index
, CAST(NULL AS ARRAY<BIGINT>) AS trace_address
, t.contract_address
, CASE
WHEN t.contract_address =
{% if native_contract_address %}
{{native_contract_address}}
{% else %}
CAST(NULL AS varbinary)
{% endif %} THEN 'native'
ELSE '{{token_standard_20}}'
END AS token_standard
, '{{token_standard_20}}' AS token_standard
, t."from"
, t.to
, t.value AS amount_raw
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{ config(
schema = 'tokens_ethereum',
alias = 'base_transfers',
partition_by = ['token_standard', 'block_date'],
materialized = 'incremental',
file_format = 'delta',
incremental_strategy = 'merge',
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')],
unique_key = ['unique_key'],
)
schema = 'tokens_ethereum',
alias = 'base_transfers',
partition_by = ['token_standard', 'block_date'],
materialized = 'incremental',
file_format = 'delta',
incremental_strategy = 'merge',
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')],
unique_key = ['unique_key'],
)
}}

{{transfers_base(
Expand Down

0 comments on commit c3a8e7c

Please sign in to comment.