mirror of
https://github.com/FlipsideCrypto/flow-models.git
synced 2026-02-06 13:41:55 +00:00
old blocks (#485)
This commit is contained in:
parent
626dc3ec48
commit
c135a26a42
@ -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 %}
|
||||
)
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user