Skip to content

Commit

Permalink
Run test incrementally
Browse files Browse the repository at this point in the history
remove quote
  • Loading branch information
amishas157 committed Oct 4, 2024
1 parent e41f9a2 commit aecc5c8
Show file tree
Hide file tree
Showing 16 changed files with 880 additions and 322 deletions.
58 changes: 42 additions & 16 deletions models/staging/stg_account_signers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ models:
- name: stg_account_signers
tests:
- dbt_utils.recency:
datepart: day
datepart: hour
field: cast(closed_at as timestamp)
interval: 2
interval: 1
meta:
description: "Monitors the freshness of your table over time, as the expected time between data updates."
- dbt_utils.unique_combination_of_columns:
- incremental_unique_combination_of_columns:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
combination_of_columns:
- account_id
- signer
Expand All @@ -21,46 +23,70 @@ models:
- name: account_id
description: '{{ doc("account_id") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: signer
description: '{{ doc("signer") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: weight
description: '{{ doc("weight") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: sponsor
description: '{{ doc("sponsor") }}'
- name: last_modified_ledger
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: ledger_entry_change
tests:
- not_null
- accepted_values:
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- incremental_accepted_values:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
values: [0, 1, 2]
quote: false

- name: deleted
description: '{{ doc("deleted") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: batch_id
description: '{{ doc("batch_id") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: batch_run_date
description: '{{ doc("batch_run_date") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: closed_at
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: ledger_sequence
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: batch_insert_ts
description: '{{ doc("batch_insert_ts") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: airflow_start_ts
112 changes: 82 additions & 30 deletions models/staging/stg_accounts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,117 +4,169 @@ models:
- name: stg_accounts
tests:
- dbt_utils.recency:
datepart: day
datepart: hour
field: cast(closed_at as timestamp)
interval: 2
interval: 1
meta:
description: "Monitors the freshness of your table over time, as the expected time between data updates."
- dbt_utils.unique_combination_of_columns:
- incremental_unique_combination_of_columns:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
combination_of_columns:
- account_id
- sequence_number
- ledger_entry_change
- last_modified_ledger
meta:
description: "Tests the uniqueness combination of: account_id, signer and ledger_sequence."
description: "Tests the uniqueness combination of: account_id, sequence_number, ledger_entry_change and last_modified_ledger."
columns:
- name: account_id
description: '{{ doc("account_id") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: balance
description: '{{ doc("balance") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: buying_liabilities
description: '{{ doc("buying_liabilities") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: selling_liabilities
description: '{{ doc("selling_liabilities") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: sequence_number
description: '{{ doc("sequence_number") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: num_subentries
description: '{{ doc("num_subentries") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: inflation_destination
description: '{{ doc("inflation_destination") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: flags
description: '{{ doc("flags_accounts_balances") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: home_domain
description: '{{ doc("home_domain") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: master_weight
description: '{{ doc("master_weight") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: threshold_low
description: '{{ doc("threshold_low") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: threshold_medium
description: '{{ doc("threshold_medium") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: threshold_high
description: '{{ doc("threshold_high") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: last_modified_ledger
description: '{{ doc("last_modified_ledger") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: ledger_entry_change
description: '{{ doc("ledger_entry_change") }}'
tests:
- not_null
- accepted_values:
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- incremental_accepted_values:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
values: [0, 1, 2]
quote: false

- name: deleted
description: '{{ doc("deleted") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: sponsor
description: '{{ doc("sponsor") }}'
- name: num_sponsored
description: '{{ doc("num_sponsored") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: num_sponsoring
description: '{{ doc("num_sponsoring") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: sequence_ledger
description: '{{ doc("sequence_ledger") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: batch_id
description: '{{ doc("batch_id") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: batch_run_date
description: '{{ doc("batch_run_date") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: closed_at
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: ledger_sequence
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: batch_insert_ts
description: '{{ doc("batch_insert_ts") }}'
tests:
- not_null
- incremental_not_null:
date_column_name: "closed_at"
greater_than_equal_to: "2 day"
- name: airflow_start_ts
Loading

0 comments on commit aecc5c8

Please sign in to comment.