flow-models/models/silver/silver__event_attributes_https.yml
Jack Forgash 81f6b817fd
AN-2005/reduce dup tests (#61)
* blocks and txs - silver

* fewer tests

* clean-up

* a few more
2022-10-11 15:20:02 -06:00

115 lines
3.3 KiB
YAML

version: 2
models:
- name: silver__event_attributes_https
description: |-
This table cleans and transform attributes from each event in the events table.
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- tx_id
- event_index
- attribute_index
columns:
- name: attribute_id
description: "{{ doc('attribute_id') }}"
tests:
- not_null
- unique
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- name: event_id
description: "{{ doc('event_id') }}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- name: tx_id
description: "{{ doc('tx_id') }}"
tests:
- not_null
- name: block_timestamp
description: "{{ doc('block_timestamp') }}"
tests:
- not_null
- dbt_expectations.expect_row_values_to_have_recent_data:
datepart: day
interval: 1
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- TIMESTAMP_NTZ
- name: event_index
description: "{{ doc('event_index') }}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- NUMBER
- name: attribute_index
description: "{{ doc('attribute_index') }}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- NUMBER
- name: event_contract
description: "{{ doc('event_contract') }}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- name: event_type
description: "{{ doc('event_type') }}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- name: attribute_key
description: "{{ doc('attribute_key') }}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- name: decoded_address
description: "{{ doc('decoded_address') }}"
- name: attribute_value
description: "{{ doc('attribute_value') }}"
- name: attribute_value_adj
description: "{{ doc('attribute_value_adj') }}"
- name: _ingested_at
description: "{{ doc('_ingested_at') }}"
- name: _inserted_timestamp
description: "{{ doc('_inserted_timestamp') }}"
tests:
- not_null
- dbt_expectations.expect_row_values_to_have_recent_data:
datepart: day
interval: 1
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- TIMESTAMP_NTZ