Skip to content

Commit

Permalink
look for new data in current max partition also (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
desmond-hui authored Jan 29, 2025
1 parent 634d9db commit 759603a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/bronze/stage/bronze__stage_block_txs_2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FROM
{{ ref('bronze__streamline_block_txs_2') }}
WHERE
{% if is_incremental() %}
_partition_id > (SELECT max(_partition_id) FROM {{ this }})
_partition_id >= (SELECT max(_partition_id) FROM {{ this }})
AND _inserted_timestamp >= (SELECT max(_inserted_timestamp) FROM {{ this }})
{% else %}
_partition_id = (SELECT max(_partition_id) FROM {{ source('solana_streamline', 'complete_block_txs_2') }}) -- Reference this once to get a starting point
Expand Down

0 comments on commit 759603a

Please sign in to comment.