mirror of
https://github.com/FlipsideCrypto/sei-models.git
synced 2026-02-06 17:06:47 +00:00
stop rerequesting
This commit is contained in:
parent
e52130c90d
commit
bcfa0d9765
@ -1,7 +1,39 @@
|
||||
{{ config (
|
||||
materialized = 'view'
|
||||
) }}
|
||||
{{ streamline_external_table_query_v2(
|
||||
{# {{ streamline_external_table_query_v2(
|
||||
model = "sei_addresses",
|
||||
partition_function = "to_date(SPLIT_PART(SPLIT_PART(file_name, '/', 3), '_', 1), 'YYYYMMDD')"
|
||||
) }}
|
||||
#}
|
||||
|
||||
|
||||
WITH meta AS (
|
||||
SELECT
|
||||
job_created_time AS _inserted_timestamp,
|
||||
file_name,
|
||||
to_date(SPLIT_PART(SPLIT_PART(file_name, '/', 3), '_', 1), 'YYYYMMDD') AS partition_key
|
||||
FROM
|
||||
TABLE(
|
||||
information_schema.external_table_file_registration_history(
|
||||
start_time => DATEADD('day', -3, CURRENT_TIMESTAMP()),
|
||||
table_name => 'streamline.SEI.sei_addresses')
|
||||
) A
|
||||
)
|
||||
SELECT
|
||||
s.*,
|
||||
b.file_name,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ source(
|
||||
'bronze_streamline',
|
||||
'sei_addresses'
|
||||
) }}
|
||||
s
|
||||
JOIN meta b
|
||||
ON b.file_name = metadata$filename
|
||||
AND b.partition_key = s.partition_key
|
||||
WHERE
|
||||
b.partition_key = s.partition_key
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ FROM
|
||||
{{ ref('bronze__streamline_FR_sei_addresses') }}
|
||||
{% endif %}
|
||||
WHERE
|
||||
DATA :result LIKE 'sei%'
|
||||
1 = 1 --DATA :result LIKE 'sei%'
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >=(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user