old blocks (#485)

This commit is contained in:
Austin 2025-09-16 10:38:07 -04:00 committed by GitHub
parent 626dc3ec48
commit c135a26a42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 14 deletions

View File

@ -22,10 +22,10 @@ WITH bronze_blocks AS (
SELECT
COALESCE(MAX(_inserted_timestamp), '1900-01-01'::TIMESTAMP) AS _inserted_timestamp
FROM {{ this }}
) AND DATA:result IS NOT NULL
) AND DATA:result IS NOT NULL AND block_number >= 67860000
{% else %}
{{ ref('bronze_evm__FR_testnet_blocks') }}
WHERE DATA:result IS NOT NULL
WHERE DATA:result IS NOT NULL AND block_number >= 67860000
{% endif %}
)

View File

@ -20,16 +20,14 @@ WITH bronze AS (
{% if is_incremental() %}
{{ ref('bronze_evm__testnet_receipts') }}
WHERE
_inserted_timestamp >= (
SELECT
MAX(_inserted_timestamp) _inserted_timestamp
FROM
{{ this }}
) AND data:result[0] is not null
WHERE _inserted_timestamp >= (
SELECT
COALESCE(MAX(_inserted_timestamp), '1900-01-01'::TIMESTAMP) AS _inserted_timestamp
FROM {{ this }}
) AND data:result[0] is not null and block_number >= 67860000
{% else %}
{{ ref('bronze_evm__FR_testnet_receipts') }}
WHERE data:result[0] is not null
WHERE data:result[0] is not null and block_number >= 67860000
{% endif %}
qualify(ROW_NUMBER() over (PARTITION BY block_number

View File

@ -30,10 +30,10 @@ WITH bronze_traces AS (
COALESCE(MAX(_inserted_timestamp), '1900-01-01') _inserted_timestamp
FROM
{{ this }}
)
) AND block_number >= 67860000
{% else %}
{{ ref('bronze_evm__FR_testnet_traces') }}
WHERE DATA :result IS NOT NULL
WHERE DATA :result IS NOT NULL AND block_number >= 67860000
{% endif %}
qualify(ROW_NUMBER() over (PARTITION BY block_number, tx_position

View File

@ -22,10 +22,10 @@ WITH flat_txs as (
SELECT
COALESCE(MAX(_inserted_timestamp), '1900-01-01'::TIMESTAMP) AS _inserted_timestamp
FROM {{ this }}
) AND data:result:transactions[0] is not null
) AND data:result:transactions[0] is not null AND block_number >= 67860000
{% else %}
{{ ref('bronze_evm__FR_testnet_blocks') }}
WHERE data:result:transactions[0] is not null
WHERE data:result:transactions[0] is not null AND block_number >= 67860000
{% endif %}
),
bronze_transactions AS (