Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust recency tests, tag appropriately #125

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}'
Expand Down
2 changes: 1 addition & 1 deletion models/marts/ledger_current_state/accounts_current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}'
Expand Down
2 changes: 1 addition & 1 deletion models/marts/ledger_current_state/offers_current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}'
Expand Down
2 changes: 1 addition & 1 deletion models/marts/ledger_current_state/ttl_current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}'
Expand Down
1 change: 1 addition & 0 deletions models/staging/stg_account_signers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ models:
- name: stg_account_signers
tests:
- dbt_utils.recency:
tags: [recency]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this tag will trigger tests on staging models as part of recency DAG

However, recency DAG was designed to only trigger tests for final tables: marts

staging tests are triggered as part of model build. Do we want to trigger staging recency checks apart from model builds?

datepart: hour
field: cast(closed_at as timestamp)
interval: '{{ 1 if target.name == "prod" else 24 }}'
Expand Down
1 change: 1 addition & 0 deletions models/staging/stg_accounts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
3 changes: 2 additions & 1 deletion models/staging/stg_claimable_balances.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion models/staging/stg_contract_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions models/staging/stg_history_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
1 change: 1 addition & 0 deletions models/staging/stg_history_effects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
1 change: 1 addition & 0 deletions models/staging/stg_history_ledgers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
1 change: 1 addition & 0 deletions models/staging/stg_history_operations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
1 change: 1 addition & 0 deletions models/staging/stg_history_trades.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
1 change: 1 addition & 0 deletions models/staging/stg_history_transactions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
1 change: 1 addition & 0 deletions models/staging/stg_liquidity_pools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}'
Expand Down
1 change: 1 addition & 0 deletions models/staging/stg_offers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
1 change: 1 addition & 0 deletions models/staging/stg_trust_lines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
3 changes: 2 additions & 1 deletion models/staging/stg_ttl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading