Skip to content

Commit

Permalink
Merge pull request #378 from FlipsideCrypto/quickfix-pool-events
Browse files Browse the repository at this point in the history
quickfix/pool_events upd config
  • Loading branch information
forgxyz authored Nov 27, 2024
2 parents 1f59d96 + 16ec314 commit 32214d3
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions models/silver/curated/staking/silver__pool_events.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{ config(
materialized = 'table',
materialized = 'incremental',
incremental_strategy = 'merge',
merge_exclude_columns = ['inserted_timestamp'],
unique_key = 'tx_hash',
tags = ['curated','scheduled_non_core'],
cluster_by = ['_partition_by_block_number', 'block_timestamp::date']
Expand All @@ -22,12 +24,18 @@ WITH receipts AS (
FROM
{{ ref('silver__streamline_receipts_final') }}
WHERE
receipt_succeeded
{% if var("MANUAL_FIX") %}
{{ partition_load_manual('no_buffer') }}
{% else %}
{{ incremental_load_filter('_inserted_timestamp') }}
{% endif %}
AND receipt_succeeded
AND {{ partition_load_manual('no_buffer') }}

{% elif is_incremental() %}
AND modified_timestamp >= (
SELECT
MAX(modified_timestamp)
FROM
{{ this }}
)
{% endif %}
),
FINAL AS (
SELECT
Expand Down

0 comments on commit 32214d3

Please sign in to comment.