added blocks_ and tx_ completeness

This commit is contained in:
Mike Stepanovic 2025-03-20 13:20:57 -06:00
parent 66875b4b60
commit c10fe89016

View File

@ -6,66 +6,6 @@ models:
contract:
enforced: true
tests:
- unique:
- TEST_TIMESTAMP
- dbt_utils.recency:
datepart: day
field: TEST_TIMESTAMP
interval: 2
severity: error
tags: ['test_recency']
columns:
- name: MIN_BLOCK
data_type: NUMBER
description: The lowest block id in the test
tests:
- not_null:
tag: ['test_quality']
- name: MAX_BLOCK
data_type: NUMBER
description: The highest block id in the test
tests:
- not_null:
tag: ['test_quality']
- name: MIN_BLOCK_TIMESTAMP
data_type: TIMESTAMP_NTZ
description: The lowest block timestamp in the test
tests:
- not_null:
tag: ['test_quality']
- name: MAX_BLOCK_TIMESTAMP
data_type: TIMESTAMP_NTZ
description: The highest block timestamp in the test
tests:
- not_null:
tag: ['test_quality']
- name: BLOCKS_TESTED
data_type: NUMBER
description: Count of blocks in the test
tests:
- not_null:
tag: ['test_quality']
- name: BLOCKS_IMPACTED_COUNT
data_type: NUMBER
description: Count of block gaps in the test
tests:
- not_null:
tag: ['test_quality']
- name: BLOCKS_IMPACTED_ARRAY
data_type: ARRAY
description: Array of affected blocks
- name: TEST_TIMESTAMP
data_type: TIMESTAMP_NTZ
description: When the test was run
tests:
- not_null:
tag: ['test_quality']
- name: silver_observability__transactions_completeness
description: Records of all blocks with missing transactions with a timestamp the test was run
tests:
- unique:
- TEST_TIMESTAMP
- dbt_utils.recency:
datepart: day
field: TEST_TIMESTAMP
@ -121,3 +61,66 @@ models:
tests:
- not_null:
tag: ['test_quality']
- unique:
tag: ['test_quality']
- name: silver_observability__transactions_completeness
description: Records of all blocks with missing transactions with a timestamp the test was run
tests:
- dbt_utils.recency:
datepart: day
field: TEST_TIMESTAMP
interval: 2
severity: error
tags: ['test_recency']
columns:
- name: TEST_NAME
data_type: VARCHAR
description: Name for the test
- name: MIN_BLOCK
data_type: NUMBER
description: The lowest block id in the test
tests:
- not_null:
tag: ['test_quality']
- name: MAX_BLOCK
data_type: NUMBER
description: The highest block id in the test
tests:
- not_null:
tag: ['test_quality']
- name: MIN_BLOCK_TIMESTAMP
data_type: TIMESTAMP_NTZ
description: The lowest block timestamp in the test
tests:
- not_null:
tag: ['test_quality']
- name: MAX_BLOCK_TIMESTAMP
data_type: TIMESTAMP_NTZ
description: The highest block timestamp in the test
tests:
- not_null:
tag: ['test_quality']
- name: BLOCKS_TESTED
data_type: NUMBER
description: Count of blocks in the test
tests:
- not_null:
tag: ['test_quality']
- name: BLOCKS_IMPACTED_COUNT
data_type: NUMBER
description: Count of block gaps in the test
tests:
- not_null:
tag: ['test_quality']
- name: BLOCKS_IMPACTED_ARRAY
data_type: ARRAY
description: Array of affected blocks
- name: TEST_TIMESTAMP
data_type: TIMESTAMP_NTZ
description: When the test was run
tests:
- not_null:
tag: ['test_quality']
- unique:
tag: ['test_quality']