add tests

This commit is contained in:
Jack Forgash 2022-09-25 12:36:02 -06:00
parent 7bbd7fb392
commit 9ef2551418
3 changed files with 21 additions and 19 deletions

View File

@ -41,6 +41,7 @@ tests:
+severity: warn # default to warn for all tests
core:
+severity: error # but error if a core view is having issues
+store_failures: true # all tests
vars:
"dbt_date:time_zone": GMT

View File

@ -8,6 +8,9 @@ models:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- block_id
- sequence_gaps:
column_name: block_id
where: BLOCK_TIMESTAMP < CURRENT_DATE
columns:
- name: BLOCK_ID
@ -26,6 +29,9 @@ models:
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- TIMESTAMP_NTZ
- dbt_expectations.expect_row_values_to_have_recent_data:
datepart: day
interval: 1
- name: BLOCK_HASH
description: "{{ doc('block_hash')}}"
@ -35,7 +41,7 @@ models:
column_type_list:
- STRING
- VARCHAR
- name: CHAIN_ID
description: "{{ doc('chain_id')}}"
tests:
@ -80,7 +86,7 @@ models:
column_type_list:
- STRING
- VARCHAR
- name: BLOCK_HEIGHT
description: "{{ doc('block_height')}}"
tests:
@ -88,7 +94,7 @@ models:
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- NUMBER
- name: LAST_BLOCK_ID
description: "{{ doc('last_block_id')}}"
tests:
@ -98,7 +104,7 @@ models:
- ARRAY
- VARIANT
- OBJECT
- name: LAST_COMMIT
description: "{{ doc('last_commit')}}"
tests:
@ -115,7 +121,7 @@ models:
column_type_list:
- STRING
- VARCHAR
- name: LAST_RESULTS_HASH
description: "{{ doc('last_results_hash')}}"
tests:
@ -124,7 +130,7 @@ models:
column_type_list:
- STRING
- VARCHAR
- name: NEXT_VALIDATORS_HASH
description: "{{ doc('next_validators_hash')}}"
tests:
@ -150,4 +156,4 @@ models:
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- VARCHAR

View File

@ -26,7 +26,7 @@ models:
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- TIMESTAMP_NTZ
- name: TX_COUNT
description: "{{ doc('tx_count')}}"
tests:
@ -43,7 +43,7 @@ models:
column_type_list:
- STRING
- VARCHAR
- name: CHAIN_ID
description: "{{ doc('chain_id')}}"
tests:
@ -88,7 +88,7 @@ models:
column_type_list:
- STRING
- VARCHAR
- name: BLOCK_HEIGHT
description: "{{ doc('block_height')}}"
tests:
@ -96,7 +96,7 @@ models:
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- NUMBER
- name: LAST_BLOCK_ID
description: "{{ doc('last_block_id')}}"
tests:
@ -106,7 +106,7 @@ models:
- ARRAY
- VARIANT
- OBJECT
- name: LAST_COMMIT
description: "{{ doc('last_commit')}}"
tests:
@ -123,7 +123,7 @@ models:
column_type_list:
- STRING
- VARCHAR
- name: LAST_RESULTS_HASH
description: "{{ doc('last_results_hash')}}"
tests:
@ -132,7 +132,7 @@ models:
column_type_list:
- STRING
- VARCHAR
- name: NEXT_VALIDATORS_HASH
description: "{{ doc('next_validators_hash')}}"
tests:
@ -162,11 +162,6 @@ models:
- name: _INGESTED_AT
description: "{{ doc('_ingested_at')}}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- TIMESTAMP_NTZ
- name: _INSERTED_TIMESTAMP
description: "{{ doc('_inserted_timestamp')}}"