upd gap test severity. Add manual filter to txs and receipts

This commit is contained in:
forgash_ 2024-04-26 11:13:56 -06:00
parent 9666d0755c
commit 636d3e78bb
3 changed files with 26 additions and 16 deletions

View File

@ -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 (

View File

@ -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 (

View File

@ -1,6 +1,5 @@
{{ config(
error_if = '>=10',
warn_if = 'BETWEEN 1 AND 9',
severity = 'error',
tags = ['gap_test']
) }}