From 9de1ecb941c72db9d7d48d0dc66f975e75ad0eb5 Mon Sep 17 00:00:00 2001 From: Amisha Singla Date: Fri, 20 Sep 2024 21:26:04 +0530 Subject: [PATCH] Add recency tag --- dbt_project.yml | 1 + models/marts/enriched_history/enriched_history_operations.yml | 1 + .../enriched_history/enriched_history_operations_soroban.yml | 1 + models/marts/fee_stats_agg.yml | 1 + models/marts/history_assets.yml | 1 + models/marts/ledger_current_state/account_signers_current.yml | 1 + models/marts/ledger_current_state/accounts_current.yml | 1 + models/marts/ledger_current_state/claimable_balances_current.yml | 1 + models/marts/ledger_current_state/contract_data_current.yml | 1 + models/marts/ledger_current_state/liquidity_pools_current.yml | 1 + models/marts/ledger_current_state/offers_current.yml | 1 + models/marts/ledger_current_state/trust_lines_current.yml | 1 + models/marts/ledger_current_state/ttl_current.yml | 1 + models/marts/trade_agg.yml | 1 + 14 files changed, 14 insertions(+) diff --git a/dbt_project.yml b/dbt_project.yml index 2bc01d4..85e77e9 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -30,6 +30,7 @@ vars: airflow_start_timestamp: "{{ env_var('AIRFLOW_START_TIMESTAMP', '2000-01-01') }}" is_singular_airflow_task: "{{ env_var('IS_SINGULAR_AIRFLOW_TASK', 'false') }}" + is_recency_airflow_task: "{{ env_var('IS_RECENCY_AIRFLOW_TASK', 'false') }}" # Configuring models # Full documentation: https://docs.getdbt.com/docs/configuring-models diff --git a/models/marts/enriched_history/enriched_history_operations.yml b/models/marts/enriched_history/enriched_history_operations.yml index 11aca57..74b4df3 100644 --- a/models/marts/enriched_history/enriched_history_operations.yml +++ b/models/marts/enriched_history/enriched_history_operations.yml @@ -5,6 +5,7 @@ models: description: Aggregate table for the history operations tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: closed_at interval: 12 diff --git a/models/marts/enriched_history/enriched_history_operations_soroban.yml b/models/marts/enriched_history/enriched_history_operations_soroban.yml index 5b19d29..ccac739 100644 --- a/models/marts/enriched_history/enriched_history_operations_soroban.yml +++ b/models/marts/enriched_history/enriched_history_operations_soroban.yml @@ -5,6 +5,7 @@ models: description: Aggregate table for the history operations, taking only the soroban operations tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: closed_at interval: 12 diff --git a/models/marts/fee_stats_agg.yml b/models/marts/fee_stats_agg.yml index ed0ca51..1efc3f0 100644 --- a/models/marts/fee_stats_agg.yml +++ b/models/marts/fee_stats_agg.yml @@ -5,6 +5,7 @@ models: description: '{{ doc("fee_stats") }}' tests: - dbt_utils.recency: + tags: [recency] datepart: day field: cast(day_agg as timestamp) interval: 2 diff --git a/models/marts/history_assets.yml b/models/marts/history_assets.yml index 54886ff..9b0e9f4 100644 --- a/models/marts/history_assets.yml +++ b/models/marts/history_assets.yml @@ -5,6 +5,7 @@ models: description: '{{ doc("history_assets") }}' tests: - dbt_utils.recency: + tags: [recency] datepart: day field: cast(batch_run_date as timestamp) interval: 2 diff --git a/models/marts/ledger_current_state/account_signers_current.yml b/models/marts/ledger_current_state/account_signers_current.yml index f27e2a4..30c5588 100644 --- a/models/marts/ledger_current_state/account_signers_current.yml +++ b/models/marts/ledger_current_state/account_signers_current.yml @@ -5,6 +5,7 @@ models: description: '{{ doc("account_signers_current") }}' tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: closed_at interval: 12 diff --git a/models/marts/ledger_current_state/accounts_current.yml b/models/marts/ledger_current_state/accounts_current.yml index 43280f6..4ad59e3 100644 --- a/models/marts/ledger_current_state/accounts_current.yml +++ b/models/marts/ledger_current_state/accounts_current.yml @@ -5,6 +5,7 @@ models: description: '{{ doc("accounts_current") }}' tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: closed_at interval: 12 diff --git a/models/marts/ledger_current_state/claimable_balances_current.yml b/models/marts/ledger_current_state/claimable_balances_current.yml index 212586f..8362602 100644 --- a/models/marts/ledger_current_state/claimable_balances_current.yml +++ b/models/marts/ledger_current_state/claimable_balances_current.yml @@ -5,6 +5,7 @@ models: description: '{{ doc("claimable_balances_current") }}' tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: closed_at interval: 12 diff --git a/models/marts/ledger_current_state/contract_data_current.yml b/models/marts/ledger_current_state/contract_data_current.yml index 082205e..ce62ca8 100644 --- a/models/marts/ledger_current_state/contract_data_current.yml +++ b/models/marts/ledger_current_state/contract_data_current.yml @@ -5,6 +5,7 @@ models: description: '{{ doc("contract_data_current") }}' tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: closed_at interval: 12 diff --git a/models/marts/ledger_current_state/liquidity_pools_current.yml b/models/marts/ledger_current_state/liquidity_pools_current.yml index 042dde8..20927e7 100644 --- a/models/marts/ledger_current_state/liquidity_pools_current.yml +++ b/models/marts/ledger_current_state/liquidity_pools_current.yml @@ -5,6 +5,7 @@ models: description: '{{ doc("liquidity_pools_current") }}' tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: closed_at interval: 12 diff --git a/models/marts/ledger_current_state/offers_current.yml b/models/marts/ledger_current_state/offers_current.yml index 186db0b..28605d6 100644 --- a/models/marts/ledger_current_state/offers_current.yml +++ b/models/marts/ledger_current_state/offers_current.yml @@ -5,6 +5,7 @@ models: description: '{{ doc("offers_current") }}' tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: closed_at interval: 12 diff --git a/models/marts/ledger_current_state/trust_lines_current.yml b/models/marts/ledger_current_state/trust_lines_current.yml index 88eaa64..052cbb6 100644 --- a/models/marts/ledger_current_state/trust_lines_current.yml +++ b/models/marts/ledger_current_state/trust_lines_current.yml @@ -5,6 +5,7 @@ models: description: '{{ doc("trust_lines_current") }}' tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: closed_at interval: 12 diff --git a/models/marts/ledger_current_state/ttl_current.yml b/models/marts/ledger_current_state/ttl_current.yml index a4430a5..c6f6907 100644 --- a/models/marts/ledger_current_state/ttl_current.yml +++ b/models/marts/ledger_current_state/ttl_current.yml @@ -5,6 +5,7 @@ models: description: '{{ doc("ttl_current") }}' tests: - dbt_utils.recency: + tags: [recency] datepart: hour field: closed_at interval: 12 diff --git a/models/marts/trade_agg.yml b/models/marts/trade_agg.yml index 8963fe1..d69f613 100644 --- a/models/marts/trade_agg.yml +++ b/models/marts/trade_agg.yml @@ -5,6 +5,7 @@ models: description: '{{ doc("trade_agg") }}' tests: - dbt_utils.recency: + tags: [recency] datepart: day field: cast(day_agg as timestamp) interval: 2