From 22e72356256439004ce1d9d25f845ca0777ba708 Mon Sep 17 00:00:00 2001 From: sydneynotthecity Date: Fri, 3 Jan 2025 09:15:53 -0600 Subject: [PATCH] Adjust recency tests, tag appropriately --- models/marts/ledger_current_state/account_signers_current.yml | 2 +- models/marts/ledger_current_state/accounts_current.yml | 2 +- .../marts/ledger_current_state/claimable_balances_current.yml | 2 +- models/marts/ledger_current_state/contract_code_current.yml | 2 +- models/marts/ledger_current_state/contract_data_current.yml | 2 +- models/marts/ledger_current_state/liquidity_pools_current.yml | 2 +- models/marts/ledger_current_state/offers_current.yml | 2 +- models/marts/ledger_current_state/trust_lines_current.yml | 2 +- models/marts/ledger_current_state/ttl_current.yml | 2 +- models/staging/stg_account_signers.yml | 1 + models/staging/stg_accounts.yml | 1 + models/staging/stg_claimable_balances.yml | 3 ++- models/staging/stg_contract_data.yml | 3 ++- models/staging/stg_history_assets.yml | 1 + models/staging/stg_history_effects.yml | 1 + models/staging/stg_history_ledgers.yml | 1 + models/staging/stg_history_operations.yml | 1 + models/staging/stg_history_trades.yml | 1 + models/staging/stg_history_transactions.yml | 1 + models/staging/stg_liquidity_pools.yml | 1 + models/staging/stg_offers.yml | 1 + models/staging/stg_trust_lines.yml | 1 + models/staging/stg_ttl.yml | 3 ++- 23 files changed, 26 insertions(+), 12 deletions(-) diff --git a/models/marts/ledger_current_state/account_signers_current.yml b/models/marts/ledger_current_state/account_signers_current.yml index 09e16a7..04905fb 100644 --- a/models/marts/ledger_current_state/account_signers_current.yml +++ b/models/marts/ledger_current_state/account_signers_current.yml @@ -8,7 +8,7 @@ models: tags: [recency] datepart: hour field: closed_at - interval: 12 + interval: '{{ 12 if target.name == "prod" else 24 }}' config: enabled: '{{ target.name == "ci" or env_var("IS_RECENCY_AIRFLOW_TASK") == "true" }}' severity: '{{ "error" if target.name == "prod" else "warn" }}' diff --git a/models/marts/ledger_current_state/accounts_current.yml b/models/marts/ledger_current_state/accounts_current.yml index 130db3b..433a3d2 100644 --- a/models/marts/ledger_current_state/accounts_current.yml +++ b/models/marts/ledger_current_state/accounts_current.yml @@ -8,7 +8,7 @@ models: tags: [recency] datepart: hour field: closed_at - interval: 12 + interval: '{{ 12 if target.name == "prod" else 24 }}' config: enabled: '{{ target.name == "ci" or env_var("IS_RECENCY_AIRFLOW_TASK") == "true" }}' severity: '{{ "error" if target.name == "prod" else "warn" }}' diff --git a/models/marts/ledger_current_state/claimable_balances_current.yml b/models/marts/ledger_current_state/claimable_balances_current.yml index f7e83b7..7364d63 100644 --- a/models/marts/ledger_current_state/claimable_balances_current.yml +++ b/models/marts/ledger_current_state/claimable_balances_current.yml @@ -8,7 +8,7 @@ models: tags: [recency] datepart: hour field: closed_at - interval: 12 + interval: '{{ 12 if target.name == "prod" else 48 }}' config: enabled: '{{ target.name == "ci" or env_var("IS_RECENCY_AIRFLOW_TASK") == "true" }}' severity: '{{ "error" if target.name == "prod" else "warn" }}' diff --git a/models/marts/ledger_current_state/contract_code_current.yml b/models/marts/ledger_current_state/contract_code_current.yml index d7f0880..ba193d3 100644 --- a/models/marts/ledger_current_state/contract_code_current.yml +++ b/models/marts/ledger_current_state/contract_code_current.yml @@ -8,7 +8,7 @@ models: tags: [recency] datepart: day field: closed_at - interval: 7 + interval: '{{ 7 if target.name == "prod" else 14 }}' config: enabled: '{{ target.name == "ci" or env_var("IS_RECENCY_AIRFLOW_TASK") == "true" }}' severity: '{{ "error" if target.name == "prod" else "warn" }}' diff --git a/models/marts/ledger_current_state/contract_data_current.yml b/models/marts/ledger_current_state/contract_data_current.yml index 3fa5319..9f0d6e5 100644 --- a/models/marts/ledger_current_state/contract_data_current.yml +++ b/models/marts/ledger_current_state/contract_data_current.yml @@ -8,7 +8,7 @@ models: tags: [recency] datepart: hour field: closed_at - interval: 12 + interval: '{{ 12 if target.name == "prod" else 24 }}' config: enabled: '{{ target.name == "ci" or env_var("IS_RECENCY_AIRFLOW_TASK") == "true" }}' severity: '{{ "error" if target.name == "prod" else "warn" }}' diff --git a/models/marts/ledger_current_state/liquidity_pools_current.yml b/models/marts/ledger_current_state/liquidity_pools_current.yml index bf51bd0..923518d 100644 --- a/models/marts/ledger_current_state/liquidity_pools_current.yml +++ b/models/marts/ledger_current_state/liquidity_pools_current.yml @@ -8,7 +8,7 @@ models: tags: [recency] datepart: hour field: closed_at - interval: 24 + interval: '{{ 24 if target.name == "prod" else 336 }}' config: enabled: '{{ target.name == "ci" or env_var("IS_RECENCY_AIRFLOW_TASK") == "true" }}' severity: '{{ "error" if target.name == "prod" else "warn" }}' diff --git a/models/marts/ledger_current_state/offers_current.yml b/models/marts/ledger_current_state/offers_current.yml index cbe6a82..3e16c65 100644 --- a/models/marts/ledger_current_state/offers_current.yml +++ b/models/marts/ledger_current_state/offers_current.yml @@ -8,7 +8,7 @@ models: tags: [recency] datepart: hour field: closed_at - interval: 12 + interval: '{{ 12 if target.name == "prod" else 24 }}' config: enabled: '{{ target.name == "ci" or env_var("IS_RECENCY_AIRFLOW_TASK") == "true" }}' severity: '{{ "error" if target.name == "prod" else "warn" }}' diff --git a/models/marts/ledger_current_state/trust_lines_current.yml b/models/marts/ledger_current_state/trust_lines_current.yml index 89c9546..e50ec92 100644 --- a/models/marts/ledger_current_state/trust_lines_current.yml +++ b/models/marts/ledger_current_state/trust_lines_current.yml @@ -8,7 +8,7 @@ models: tags: [recency] datepart: hour field: closed_at - interval: 12 + interval: '{{ 12 if target.name == "prod" else 24 }}' config: enabled: '{{ target.name == "ci" or env_var("IS_RECENCY_AIRFLOW_TASK") == "true" }}' severity: '{{ "error" if target.name == "prod" else "warn" }}' diff --git a/models/marts/ledger_current_state/ttl_current.yml b/models/marts/ledger_current_state/ttl_current.yml index 0988d66..17c0233 100644 --- a/models/marts/ledger_current_state/ttl_current.yml +++ b/models/marts/ledger_current_state/ttl_current.yml @@ -8,7 +8,7 @@ models: tags: [recency] datepart: hour field: closed_at - interval: 12 + interval: '{{ 12 if target.name == "prod" else 24 }}' config: enabled: '{{ target.name == "ci" or env_var("IS_RECENCY_AIRFLOW_TASK") == "true" }}' severity: '{{ "error" if target.name == "prod" else "warn" }}' diff --git a/models/staging/stg_account_signers.yml b/models/staging/stg_account_signers.yml index 8fbb95c..859709b 100644 --- a/models/staging/stg_account_signers.yml +++ b/models/staging/stg_account_signers.yml @@ -4,6 +4,7 @@ models: - name: stg_account_signers tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) interval: '{{ 1 if target.name == "prod" else 24 }}' diff --git a/models/staging/stg_accounts.yml b/models/staging/stg_accounts.yml index 18315a1..c073b5e 100644 --- a/models/staging/stg_accounts.yml +++ b/models/staging/stg_accounts.yml @@ -4,6 +4,7 @@ models: - name: stg_accounts tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) interval: '{{ 1 if target.name == "prod" else 24 }}' diff --git a/models/staging/stg_claimable_balances.yml b/models/staging/stg_claimable_balances.yml index 3055f3e..e7e1475 100644 --- a/models/staging/stg_claimable_balances.yml +++ b/models/staging/stg_claimable_balances.yml @@ -4,9 +4,10 @@ models: - name: stg_claimable_balances tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) - interval: '{{ 1 if target.name == "prod" else 24 }}' + interval: '{{ 1 if target.name == "prod" else 48 }}' config: enabled: '{{ target.name != "jenkins" }}' meta: diff --git a/models/staging/stg_contract_data.yml b/models/staging/stg_contract_data.yml index e906178..30b2df0 100644 --- a/models/staging/stg_contract_data.yml +++ b/models/staging/stg_contract_data.yml @@ -4,9 +4,10 @@ models: - name: stg_contract_data tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) - interval: '{{ 1 if target.name == "prod" else 24 }}' + interval: '{{ 1 if target.name == "prod" else 48 }}' config: enabled: '{{ target.name != "jenkins" }}' meta: diff --git a/models/staging/stg_history_assets.yml b/models/staging/stg_history_assets.yml index 9d020bb..6b5ca8f 100644 --- a/models/staging/stg_history_assets.yml +++ b/models/staging/stg_history_assets.yml @@ -4,6 +4,7 @@ models: - name: stg_history_assets tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) interval: '{{ 3 if target.name == "prod" else 24 }}' diff --git a/models/staging/stg_history_effects.yml b/models/staging/stg_history_effects.yml index 74b834d..1b29cd2 100644 --- a/models/staging/stg_history_effects.yml +++ b/models/staging/stg_history_effects.yml @@ -4,6 +4,7 @@ models: - name: stg_history_effects tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) interval: '{{ 1 if target.name == "prod" else 24 }}' diff --git a/models/staging/stg_history_ledgers.yml b/models/staging/stg_history_ledgers.yml index 6e69960..d7d6814 100644 --- a/models/staging/stg_history_ledgers.yml +++ b/models/staging/stg_history_ledgers.yml @@ -4,6 +4,7 @@ models: - name: stg_history_ledgers tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) interval: '{{ 1 if target.name == "prod" else 24 }}' diff --git a/models/staging/stg_history_operations.yml b/models/staging/stg_history_operations.yml index 5470b41..2798489 100644 --- a/models/staging/stg_history_operations.yml +++ b/models/staging/stg_history_operations.yml @@ -4,6 +4,7 @@ models: - name: stg_history_operations tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) interval: '{{ 1 if target.name == "prod" else 24 }}' diff --git a/models/staging/stg_history_trades.yml b/models/staging/stg_history_trades.yml index 6f19450..c01cfda 100644 --- a/models/staging/stg_history_trades.yml +++ b/models/staging/stg_history_trades.yml @@ -4,6 +4,7 @@ models: - name: stg_history_trades tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(ledger_closed_at as timestamp) interval: '{{ 1 if target.name == "prod" else 24 }}' diff --git a/models/staging/stg_history_transactions.yml b/models/staging/stg_history_transactions.yml index 0589dff..587d361 100644 --- a/models/staging/stg_history_transactions.yml +++ b/models/staging/stg_history_transactions.yml @@ -4,6 +4,7 @@ models: - name: stg_history_transactions tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) interval: '{{ 1 if target.name == "prod" else 24 }}' diff --git a/models/staging/stg_liquidity_pools.yml b/models/staging/stg_liquidity_pools.yml index 39fef6f..03a8d0c 100644 --- a/models/staging/stg_liquidity_pools.yml +++ b/models/staging/stg_liquidity_pools.yml @@ -4,6 +4,7 @@ models: - name: stg_liquidity_pools tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) interval: '{{ 1 if target.name == "prod" else 336}}' diff --git a/models/staging/stg_offers.yml b/models/staging/stg_offers.yml index a635e87..0ae7bcd 100644 --- a/models/staging/stg_offers.yml +++ b/models/staging/stg_offers.yml @@ -4,6 +4,7 @@ models: - name: stg_offers tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) interval: '{{ 1 if target.name == "prod" else 24 }}' diff --git a/models/staging/stg_trust_lines.yml b/models/staging/stg_trust_lines.yml index 68f9a57..6393969 100644 --- a/models/staging/stg_trust_lines.yml +++ b/models/staging/stg_trust_lines.yml @@ -4,6 +4,7 @@ models: - name: stg_trust_lines tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) interval: '{{ 1 if target.name == "prod" else 24 }}' diff --git a/models/staging/stg_ttl.yml b/models/staging/stg_ttl.yml index 63d51c6..740da7a 100644 --- a/models/staging/stg_ttl.yml +++ b/models/staging/stg_ttl.yml @@ -4,9 +4,10 @@ models: - name: stg_ttl tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: cast(closed_at as timestamp) - interval: '{{ 1 if target.name == "prod" else 24 }}' + interval: '{{ 1 if target.name == "prod" else 48 }}' config: enabled: '{{ target.name != "jenkins" }}' meta: