-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ee8ad5
commit e5bd46b
Showing
16 changed files
with
2,470 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: stg_account_signers | ||
tests: | ||
- dbt_utils.recency: | ||
datepart: day | ||
field: cast(closed_at as timestamp) | ||
interval: 2 | ||
config: | ||
severity: '{{ "error" if target.name == "prod" else "warn" }}' | ||
meta: | ||
description: "Monitors the freshness of your table over time, as the expected time between data updates." | ||
- dbt_utils.unique_combination_of_columns: | ||
combination_of_columns: | ||
- account_id | ||
- signer | ||
- ledger_sequence | ||
- last_modified_ledger | ||
meta: | ||
description: "Tests the uniqueness combination of: account_id, signer, ledger_sequence and last_modified_ledger" | ||
columns: | ||
- name: account_id | ||
description: '{{ doc("account_id") }}' | ||
tests: | ||
- not_null | ||
- name: signer | ||
description: '{{ doc("signer") }}' | ||
tests: | ||
- not_null | ||
- name: weight | ||
description: '{{ doc("weight") }}' | ||
tests: | ||
- not_null | ||
- name: sponsor | ||
description: '{{ doc("sponsor") }}' | ||
tests: | ||
- not_null | ||
- name: last_modified_ledger | ||
tests: | ||
- not_null | ||
- name: ledger_entry_change | ||
tests: | ||
- not_null | ||
- name: deleted | ||
description: '{{ doc("deleted") }}' | ||
tests: | ||
- not_null | ||
- name: batch_id | ||
description: '{{ doc("batch_id") }}' | ||
tests: | ||
- not_null | ||
- name: batch_run_date | ||
description: '{{ doc("batch_run_date") }}' | ||
tests: | ||
- not_null | ||
- name: closed_at | ||
tests: | ||
- not_null | ||
- name: ledger_sequence | ||
tests: | ||
- not_null | ||
- name: batch_insert_ts | ||
description: '{{ doc("batch_insert_ts") }}' | ||
tests: | ||
- not_null | ||
- name: airflow_start_ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: stg_accounts | ||
tests: | ||
- dbt_utils.recency: | ||
datepart: day | ||
field: cast(closed_at as timestamp) | ||
interval: 2 | ||
config: | ||
severity: '{{ "error" if target.name == "prod" else "warn" }}' | ||
meta: | ||
description: "Monitors the freshness of your table over time, as the expected time between data updates." | ||
- dbt_utils.unique_combination_of_columns: | ||
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." | ||
columns: | ||
- name: account_id | ||
description: '{{ doc("account_id") }}' | ||
tests: | ||
- not_null | ||
- name: balance | ||
description: '{{ doc("balance") }}' | ||
tests: | ||
- not_null | ||
- name: buying_liabilities | ||
description: '{{ doc("buying_liabilities") }}' | ||
tests: | ||
- not_null | ||
- name: selling_liabilities | ||
description: '{{ doc("selling_liabilities") }}' | ||
tests: | ||
- not_null | ||
- name: sequence_number | ||
description: '{{ doc("sequence_number") }}' | ||
tests: | ||
- not_null | ||
- name: num_subentries | ||
description: '{{ doc("num_subentries") }}' | ||
tests: | ||
- not_null | ||
- name: inflation_destination | ||
description: '{{ doc("inflation_destination") }}' | ||
tests: | ||
- not_null | ||
- name: flags | ||
description: '{{ doc("flags_accounts_balances") }}' | ||
tests: | ||
- not_null | ||
- name: home_domain | ||
description: '{{ doc("home_domain") }}' | ||
tests: | ||
- not_null | ||
- name: master_weight | ||
description: '{{ doc("master_weight") }}' | ||
tests: | ||
- not_null | ||
- name: threshold_low | ||
description: '{{ doc("threshold_low") }}' | ||
tests: | ||
- not_null | ||
- name: threshold_medium | ||
description: '{{ doc("threshold_medium") }}' | ||
tests: | ||
- not_null | ||
- name: threshold_high | ||
description: '{{ doc("threshold_high") }}' | ||
tests: | ||
- not_null | ||
- name: last_modifed_ledger | ||
description: '{{ doc("last_modified_ledger") }}' | ||
tests: | ||
- not_null | ||
- name: ledger_entry_change | ||
description: '{{ doc("ledger_entry_change") }}' | ||
tests: | ||
- not_null | ||
- accepted_values: | ||
values: [0, 1, 2] | ||
quote: false | ||
- name: deleted | ||
description: '{{ doc("deleted") }}' | ||
tests: | ||
- not_null | ||
- name: sponsor | ||
description: '{{ doc("sponsor") }}' | ||
- name: num_sponsored | ||
description: '{{ doc("num_sponsored") }}' | ||
tests: | ||
- not_null | ||
- name: num_sponsoring | ||
description: '{{ doc("num_sponsoring") }}' | ||
tests: | ||
- not_null | ||
- name: sequence_ledger | ||
description: '{{ doc("sequence_ledger") }}' | ||
tests: | ||
- not_null | ||
- name: batch_id | ||
description: '{{ doc("batch_id") }}' | ||
tests: | ||
- not_null | ||
- name: batch_run_date | ||
description: '{{ doc("batch_run_date") }}' | ||
tests: | ||
- not_null | ||
- name: closed_at | ||
tests: | ||
- not_null | ||
- name: ledger_sequence | ||
tests: | ||
- not_null | ||
- name: batch_insert_ts | ||
description: '{{ doc("batch_insert_ts") }}' | ||
tests: | ||
- not_null | ||
- name: airflow_start_ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: stg_claimable_balances | ||
tests: | ||
- dbt_utils.recency: | ||
datepart: day | ||
field: cast(closed_at as timestamp) | ||
interval: 2 | ||
config: | ||
severity: '{{ "error" if target.name == "prod" else "warn" }}' | ||
meta: | ||
description: "Monitors the freshness of your table over time, as the expected time between data updates." | ||
- dbt_utils.unique_combination_of_columns: | ||
combination_of_columns: | ||
- balance_id | ||
- ledger_entry_change | ||
meta: | ||
description: "Tests the uniqueness combination of: balance_id and ledger_entry_change." | ||
columns: | ||
- name: balance_id | ||
description: '{{ doc("balance_id") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: claimants | ||
description: '{{ doc("claimants") }}' | ||
|
||
- name: claimants.destination | ||
description: '{{ doc("claimants_destination") }}' | ||
|
||
- name: claimants.predicate | ||
description: '{{ doc("claimants_predicate") }}' | ||
|
||
- name: claimants.predicate.unconditional | ||
description: '{{ doc("claimants_predicate_unconditional") }}' | ||
|
||
- name: claimants.predicate.abs_before | ||
description: '{{ doc("claimants_predicate_abs_before") }}' | ||
|
||
- name: claimants.predicate.rel_before | ||
description: '{{ doc("claimants_predicate_rel_before") }}' | ||
|
||
- name: claimants.predicate.abs_before_epoch | ||
description: '{{ doc("claimants_predicate_abs_before_epoch") }}' | ||
|
||
- name: asset_type | ||
description: '{{ doc("asset_type") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: asset_code | ||
description: '{{ doc("asset_code") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: asset_issuer | ||
description: '{{ doc("asset_issuer") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: asset_id | ||
description: '{{ doc("asset_id") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: asset_amount | ||
description: '{{ doc("asset_amount") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: sponsor | ||
description: '{{ doc("sponsor") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: flags | ||
description: '{{ doc("flags_accounts_balances") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: last_modified_ledger | ||
description: '{{ doc("last_modified_ledger") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: ledger_entry_change | ||
description: '{{ doc("ledger_entry_change") }}' | ||
tests: | ||
- not_null | ||
- accepted_values: | ||
values: [0, 1, 2] | ||
quote: false | ||
|
||
- name: deleted | ||
description: '{{ doc("deleted") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: batch_id | ||
description: '{{ doc("batch_id") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: batch_run_date | ||
description: '{{ doc("batch_run_date") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: closed_at | ||
tests: | ||
- not_null | ||
|
||
- name: ledger_sequence | ||
tests: | ||
- not_null | ||
|
||
- name: batch_insert_ts | ||
description: '{{ doc("batch_insert_ts") }}' | ||
tests: | ||
- not_null | ||
|
||
- name: airflow_start_ts |
Oops, something went wrong.