Skip to content

Commit

Permalink
test in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
0xRobin committed Oct 9, 2024
1 parent 765cd61 commit aedec79
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dbt_macros/dune/is_incremental.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro is_incremental() %}
{#-- allow for command line compile of incremental models #}
{#-- Usage: dbt compile --vars '{force-incremental: True}' #}
{% if vars.get('force_incremental_for_testing', False) or var('force-incremental', False) %}
{% if var('force-incremental', False) %}
{{ return(True) }}
{% endif %}

Expand Down
13 changes: 6 additions & 7 deletions dbt_subprojects/nft/macros/nft_transfers.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{%- set token_standard_721 = 'bep721' if blockchain == 'bnb' else 'erc721' -%}
{%- set token_standard_1155 = 'bep1155' if blockchain == 'bnb' else 'erc1155' -%}
{%- set denormalized = True if blockchain in ['base'] else False -%}
{% set force_incremental_for_testing = True %}
SELECT
*
FROM(
Expand Down Expand Up @@ -30,11 +29,11 @@ FROM(
{% if denormalized == False %}
INNER JOIN {{ base_transactions }} et ON et.block_number = t.evt_block_number
AND et.hash = t.evt_tx_hash
{% if is_incremental() %}
{% if is_incremental() or true %}
AND {{incremental_predicate('et.block_time')}}
{% endif %}
{%- endif -%}
{% if is_incremental() %}
{% if is_incremental() or true %}
WHERE {{incremental_predicate('t.evt_block_time')}}
{% endif %}

Expand Down Expand Up @@ -64,11 +63,11 @@ FROM(
{%- if denormalized == False %}
INNER JOIN {{ base_transactions }} et ON et.block_number = t.evt_block_number
AND et.hash = t.evt_tx_hash
{% if is_incremental() %}
{% if is_incremental() or true %}
AND {{incremental_predicate('et.block_time')}}
{% endif %}
{%- endif -%}
{% if is_incremental() %}
{% if is_incremental() or true %}
WHERE {{incremental_predicate('t.evt_block_time')}}
{% endif %}

Expand Down Expand Up @@ -99,14 +98,14 @@ FROM(
, value, id
FROM {{ erc1155_batch }} t
CROSS JOIN unnest(zip(t."values", t.ids)) AS foo(value, id)
{% if is_incremental() %}
{% if is_incremental() or true %}
WHERE {{incremental_predicate('t.evt_block_time')}}
{% endif %}
) t
{%- if denormalized == False %}
INNER JOIN {{ base_transactions }} et ON et.block_number = t.evt_block_number
AND et.hash = t.evt_tx_hash
{% if is_incremental() %}
{% if is_incremental() or true %}
AND {{incremental_predicate('et.block_time')}}
{% endif %}
{%- endif %}
Expand Down

0 comments on commit aedec79

Please sign in to comment.