mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 11:26:52 +00:00
upd gap test severity. Add manual filter to txs and receipts
This commit is contained in:
parent
9666d0755c
commit
636d3e78bb
@ -21,15 +21,20 @@ WITH shards AS (
|
||||
{{ ref('silver__streamline_shards') }}
|
||||
WHERE
|
||||
ARRAY_SIZE(receipt_execution_outcomes) > 0
|
||||
{% if var('IS_MIGRATION') %}
|
||||
{% if var('MANUAL_FIX') %}
|
||||
AND
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) - INTERVAL '{{ var('STREAMLINE_LOAD_LOOKBACK_HOURS') }} hours'
|
||||
FROM {{ this }}
|
||||
)
|
||||
{{ partition_load_manual('no_buffer') }}
|
||||
{% else %}
|
||||
AND {{ incremental_load_filter('_inserted_timestamp') }}
|
||||
{% if var('IS_MIGRATION') %}
|
||||
AND
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) - INTERVAL '{{ var('STREAMLINE_LOAD_LOOKBACK_HOURS') }} hours'
|
||||
FROM {{ this }}
|
||||
)
|
||||
{% else %}
|
||||
AND {{ incremental_load_filter('_inserted_timestamp') }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
),
|
||||
flatten_receipts AS (
|
||||
|
||||
@ -20,15 +20,21 @@ WITH chunks AS (
|
||||
{{ ref('silver__streamline_shards') }}
|
||||
WHERE
|
||||
chunk != 'null'
|
||||
{% if var('IS_MIGRATION') %}
|
||||
|
||||
{% if var('MANUAL_FIX') %}
|
||||
AND
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) - INTERVAL '{{ var('STREAMLINE_LOAD_LOOKBACK_HOURS') }} hours'
|
||||
FROM {{ this }}
|
||||
)
|
||||
{{ partition_load_manual('no_buffer') }}
|
||||
{% else %}
|
||||
AND {{ incremental_load_filter('_inserted_timestamp') }}
|
||||
{% if var('IS_MIGRATION') %}
|
||||
AND
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) - INTERVAL '{{ var('STREAMLINE_LOAD_LOOKBACK_HOURS') }} hours'
|
||||
FROM {{ this }}
|
||||
)
|
||||
{% else %}
|
||||
AND {{ incremental_load_filter('_inserted_timestamp') }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
),
|
||||
flatten_transactions AS (
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
{{ config(
|
||||
error_if = '>=10',
|
||||
warn_if = 'BETWEEN 1 AND 9',
|
||||
severity = 'error',
|
||||
tags = ['gap_test']
|
||||
) }}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user