diff --git a/dbt_subprojects/solana/models/_sector/dex/dex_solana_base_trades.sql b/dbt_subprojects/solana/models/_sector/dex/dex_solana_base_trades.sql index 3816731b919..41a99ad235b 100644 --- a/dbt_subprojects/solana/models/_sector/dex/dex_solana_base_trades.sql +++ b/dbt_subprojects/solana/models/_sector/dex/dex_solana_base_trades.sql @@ -12,17 +12,17 @@ }} {% set solana_dexes = [ - ref('orca_whirlpool_base_trades') - , ref('orca_whirlpool_v2_base_trades') - , ref('raydium_v3_base_trades') - , ref('raydium_v4_base_trades') - , ref('phoenix_v1_base_trades') - , ref('lifinity_v1_base_trades') - , ref('lifinity_v2_base_trades') - , ref('meteora_v1_solana_base_trades') - , ref('meteora_v2_solana_base_trades') - , ref('goosefx_ssl_v2_solana_base_trades') - , ref('pumpdotfun_solana_base_trades') + ref('raydium_v3_base_trades') + , ref('raydium_v4_base_trades') + , ref('orca_whirlpool_base_trades') + , ref('orca_whirlpool_v2_base_trades') + , ref('phoenix_v1_base_trades') + , ref('lifinity_v1_base_trades') + , ref('lifinity_v2_base_trades') + , ref('meteora_v1_solana_base_trades') + , ref('meteora_v2_solana_base_trades') + , ref('goosefx_ssl_v2_solana_base_trades') + , ref('pumpdotfun_solana_base_trades') ] %} {% for dex in solana_dexes %} diff --git a/dbt_subprojects/solana/models/_sector/dex/raydium/raydium_v3_base_trades.sql b/dbt_subprojects/solana/models/_sector/dex/raydium/raydium_v3_base_trades.sql index 25339af39e7..bf954d6d42a 100644 --- a/dbt_subprojects/solana/models/_sector/dex/raydium/raydium_v3_base_trades.sql +++ b/dbt_subprojects/solana/models/_sector/dex/raydium/raydium_v3_base_trades.sql @@ -84,7 +84,6 @@ AND {{incremental_predicate('tr_1.block_time')}} {% else %} AND tr_1.block_time >= TIMESTAMP '{{project_start_date}}' - -- AND tr_1.block_time >= now() - interval '7' day {% endif %} INNER JOIN {{ ref('tokens_solana_transfers') }} tr_2 ON tr_2.tx_id = sp.call_tx_id @@ -95,14 +94,12 @@ AND {{incremental_predicate('tr_2.block_time')}} {% else %} AND tr_2.block_time >= TIMESTAMP '{{project_start_date}}' - -- AND tr_2.block_time >= now() - interval '7' day {% endif %} WHERE 1=1 {% if is_incremental() %} AND {{incremental_predicate('call_block_time')}} {% else %} AND call_block_time >= TIMESTAMP '{{project_start_date}}' - -- AND call_block_time >= now() - interval '7' day {% endif %} ) diff --git a/dbt_subprojects/solana/models/_sector/dex/raydium/raydium_v4_base_trades.sql b/dbt_subprojects/solana/models/_sector/dex/raydium/raydium_v4_base_trades.sql index 3d7fafd2a03..35ce3259ce6 100644 --- a/dbt_subprojects/solana/models/_sector/dex/raydium/raydium_v4_base_trades.sql +++ b/dbt_subprojects/solana/models/_sector/dex/raydium/raydium_v4_base_trades.sql @@ -58,7 +58,6 @@ AND {{incremental_predicate('trs_1.block_time')}} {% else %} AND trs_1.block_time >= TIMESTAMP '{{project_start_date}}' - -- AND trs_1.block_time >= now() - interval '7' day {% endif %} INNER JOIN {{ ref('tokens_solana_transfers') }} trs_2 ON trs_2.tx_id = sp.call_tx_id @@ -72,7 +71,6 @@ AND {{incremental_predicate('trs_2.block_time')}} {% else %} AND trs_2.block_time >= TIMESTAMP '{{project_start_date}}' - -- AND trs_2.block_time >= now() - interval '7' day {% endif %} LEFT JOIN {{ ref('solana_utils_token_accounts') }} tk_2 ON tk_2.address = trs_2.from_token_account AND tk_2.account_type = 'fungible' @@ -83,9 +81,7 @@ AND {{incremental_predicate('sp.call_block_time')}} {% else %} AND sp.call_block_time >= TIMESTAMP '{{project_start_date}}' - -- AND sp.call_block_time >= now() - interval '7' day --qa {% endif %} - --force ) SELECT diff --git a/dbt_subprojects/solana/models/_sector/transfers/backfills/sol_transfers/tokens_solana_sol_transfers_current.sql b/dbt_subprojects/solana/models/_sector/transfers/backfills/sol_transfers/tokens_solana_sol_transfers_current.sql index 6c46d5666a1..c7a9e68848d 100644 --- a/dbt_subprojects/solana/models/_sector/transfers/backfills/sol_transfers/tokens_solana_sol_transfers_current.sql +++ b/dbt_subprojects/solana/models/_sector/transfers/backfills/sol_transfers/tokens_solana_sol_transfers_current.sql @@ -5,7 +5,7 @@ materialized = 'incremental', file_format = 'delta', incremental_strategy = 'delete+insert', - unique_key = ['block_date', 'tx_id', 'outer_instruction_index', 'inner_instruction_index', 'block_slot'] + unique_key = ['block_date', 'tx_id', 'outer_instruction_index', 'key_inner_instruction_index', 'block_slot'] ) }} {{ solana_sol_transfers_macro(