mirror of
https://github.com/FlipsideCrypto/solana-models.git
synced 2026-02-06 13:36:46 +00:00
delete past 6months of vote data (#871)
This commit is contained in:
parent
174dd0a91f
commit
e7f690b003
1
.github/workflows/dbt_test_weekly.yml
vendored
1
.github/workflows/dbt_test_weekly.yml
vendored
@ -43,6 +43,7 @@ jobs:
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt test -s "solana_models,tag:test_weekly"
|
||||
dbt run -s models/silver/core/silver__votes.sql --vars '{"run_votes_cleanup": true}'
|
||||
|
||||
notify-failure:
|
||||
needs: [run_dbt_jobs]
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
unique_key = "tx_id",
|
||||
incremental_predicates = ["dynamic_range_predicate", "block_timestamp::date"],
|
||||
cluster_by = ['block_timestamp::DATE','block_id','_inserted_timestamp::DATE'],
|
||||
pre_hook = "{% if var('run_votes_cleanup', false) %}DELETE FROM {{ this }} WHERE _inserted_timestamp < CURRENT_DATE - INTERVAL '6 months'{% endif %}",
|
||||
post_hook = enable_search_optimization('{{this.schema}}','{{this.identifier}}','ON EQUALITY(tx_id)'),
|
||||
full_refresh = false,
|
||||
tags = ['scheduled_core']
|
||||
|
||||
Loading…
Reference in New Issue
Block a user