osmosis-models/models/silver/core/silver__balances.yml
Eric Laurello f62198dfa1 3
2024-10-17 08:25:23 -04:00

57 lines
1.9 KiB
YAML

version: 2
models:
- name: silver__balances
description: A table containing all the liquid balances
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- BLOCK_ID
- ADDRESS
- CURRENCY
columns:
- name: BLOCK_ID
description: "{{ doc('block_id') }}"
tests:
- not_null:
where: _INSERTED_TIMESTAMP::DATE > current_date-7
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- NUMBER
- FLOAT
- name: ADDRESS
description: "{{ doc('address') }}"
tests:
- not_null:
where: _INSERTED_TIMESTAMP::DATE > current_date-7
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- dbt_expectations.expect_column_values_to_match_regex:
regex: osmo1[0-9a-z]{38,38}
- name: CURRENCY
description: "{{ doc('currency') }}"
tests:
- not_null:
where: _INSERTED_TIMESTAMP::DATE > current_date-7
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- name: AMOUNT
tests:
- not_null:
where: _INSERTED_TIMESTAMP::DATE > current_date-7
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- NUMBER
- FLOAT
- name: _INSERTED_TIMESTAMP
description: "{{ doc('ingested_at') }}"
tests:
- not_null:
where: _INSERTED_TIMESTAMP::DATE > current_date-7
- dbt_expectations.expect_row_values_to_have_recent_data:
datepart: day
interval: 3