From aedec79817ec51600ebdf5753d4a9c4257e8582b Mon Sep 17 00:00:00 2001 From: 0xRob <83790096+0xRobin@users.noreply.github.com> Date: Wed, 9 Oct 2024 09:47:58 +0200 Subject: [PATCH] test in CI --- dbt_macros/dune/is_incremental.sql | 2 +- dbt_subprojects/nft/macros/nft_transfers.sql | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dbt_macros/dune/is_incremental.sql b/dbt_macros/dune/is_incremental.sql index 431d812d255..39cd360ec05 100644 --- a/dbt_macros/dune/is_incremental.sql +++ b/dbt_macros/dune/is_incremental.sql @@ -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 %} diff --git a/dbt_subprojects/nft/macros/nft_transfers.sql b/dbt_subprojects/nft/macros/nft_transfers.sql index 118330dcea4..1805be9ddad 100644 --- a/dbt_subprojects/nft/macros/nft_transfers.sql +++ b/dbt_subprojects/nft/macros/nft_transfers.sql @@ -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( @@ -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 %} @@ -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 %} @@ -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 %}