remove inc - limit to last 30 days (#744)

This commit is contained in:
eric-laurello 2024-12-21 09:08:47 -05:00 committed by GitHub
parent 40c3f1688e
commit a1da1d12a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 24 deletions

View File

@ -1,12 +1,5 @@
{{ config(
materialized = 'incremental',
unique_key = ['mining_fleets_id'],
merge_exclude_columns = ["inserted_timestamp"],
post_hook = enable_search_optimization(
'{{this.schema}}',
'{{this.identifier}}',
'ON EQUALITY(wallet, player_profile, mining_fleets,mining_fleets_id)'
),
materialized = 'table',
tags = ['daily']
) }}
@ -39,11 +32,11 @@ WHERE
program_id IN ('SAGE2HAwep459SNq61LHvjxPk4pLPEJLoMETef7f7EE')
AND instruction :accounts [18] = 'MineMBxARiRdMh7s1wdStSK4Ns3YfnLjBfvF5ZCnzuw'
AND succeeded --= 'true'
AND block_timestamp :: DATE >= '2024-04-01'
{% if is_incremental() %}
AND modified_timestamp >= '{{ max_modified_timestamp }}'
AND block_timestamp :: DATE >= CURRENT_DATE -30 {# {% if is_incremental() %}
AND modified_timestamp >= '{{ max_modified_timestamp }}'
{% endif %}
#}
GROUP BY
1,
2,

View File

@ -1,12 +1,5 @@
{{ config(
materialized = 'incremental',
unique_key = ['scanning_fleets_id'],
merge_exclude_columns = ["inserted_timestamp"],
post_hook = enable_search_optimization(
'{{this.schema}}',
'{{this.identifier}}',
'ON EQUALITY(player_profile, scanning_fleets,scanning_fleets_id)'
),
materialized = 'table',
tags = ['daily']
) }}
@ -43,11 +36,11 @@ WHERE
AND VALUE :parsed :info :authority = 'C2478tbSLC1gfcDuCyr4pv66QQiybn77EiR1a4k7htT5'
AND instruction :accounts [18] = 'DataJpxFgHhzwu4zYJeHCnAv21YqWtanEBphNxXBHdEY'
AND succeeded
AND block_timestamp :: DATE >= '2024-04-01'
{% if is_incremental() %}
AND modified_timestamp >= '{{ max_modified_timestamp }}'
AND block_timestamp :: DATE >= CURRENT_DATE -30 {# {% if is_incremental() %}
AND modified_timestamp >= '{{ max_modified_timestamp }}'
{% endif %}
#}
GROUP BY
1,
2