mirror of
https://github.com/FlipsideCrypto/berachain-models.git
synced 2026-02-06 13:37:11 +00:00
test columns
This commit is contained in:
parent
e54ec7a497
commit
99fb60cfae
@ -4,7 +4,8 @@ models:
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- _LOG_ID
|
||||
- TX_HASH
|
||||
- EVENT_INDEX
|
||||
- fsc_utils.sequence_gaps:
|
||||
partition_by:
|
||||
- BLOCK_NUMBER
|
||||
|
||||
@ -4,7 +4,8 @@ models:
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- _LOG_ID
|
||||
- TX_HASH
|
||||
- EVENT_INDEX
|
||||
- fsc_utils.sequence_gaps:
|
||||
partition_by:
|
||||
- BLOCK_NUMBER
|
||||
|
||||
@ -6,8 +6,4 @@
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
{{ ref('testnet__fact_traces') }}
|
||||
WHERE
|
||||
from_address <> '0x'
|
||||
AND
|
||||
to_address <> '0x'
|
||||
{{ ref('testnet__fact_traces') }}
|
||||
@ -12,6 +12,4 @@ models:
|
||||
tests:
|
||||
- dbt_expectations.expect_row_values_to_have_recent_data:
|
||||
datepart: day
|
||||
interval: 1
|
||||
|
||||
|
||||
interval: 1
|
||||
@ -20,8 +20,4 @@ WHERE
|
||||
block_number
|
||||
FROM
|
||||
last_3_days
|
||||
)
|
||||
AND
|
||||
from_address <> '0x'
|
||||
AND
|
||||
to_address <> '0x'
|
||||
)
|
||||
@ -6,4 +6,4 @@
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
{{ ref('silver_testnet__traces') }}
|
||||
{{ ref('silver_testnet__traces') }}
|
||||
|
||||
@ -6,7 +6,7 @@ models:
|
||||
combination_of_columns:
|
||||
- BLOCK_NUMBER
|
||||
- TX_POSITION
|
||||
- TRACE_ADDRESS
|
||||
- TRACE_INDEX
|
||||
columns:
|
||||
- name: BLOCK_NUMBER
|
||||
tests:
|
||||
@ -14,19 +14,45 @@ models:
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- NUMBER
|
||||
- FLOAT
|
||||
- name: TX_POSITION
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- NUMBER
|
||||
- FLOAT
|
||||
- name: TRACE_ADDRESS
|
||||
tests:
|
||||
- not_null
|
||||
- name: PARENT_TRACE_ADDRESS
|
||||
- FLOAT
|
||||
- name: BLOCK_TIMESTAMP
|
||||
tests:
|
||||
- not_null:
|
||||
where: TRACE_ADDRESS <> 'ORIGIN'
|
||||
where: NOT IS_PENDING
|
||||
- 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: TX_HASH
|
||||
tests:
|
||||
- not_null:
|
||||
where: NOT IS_PENDING
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
- name: FROM_ADDRESS
|
||||
tests:
|
||||
- not_null:
|
||||
where: TYPE <> 'SELFDESTRUCT'
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
- name: TO_ADDRESS
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
where: TO_ADDRESS IS NOT NULL
|
||||
- name: IDENTIFIER
|
||||
tests:
|
||||
- not_null
|
||||
- name: VALUE
|
||||
tests:
|
||||
- not_null
|
||||
- name: GAS
|
||||
tests:
|
||||
- not_null
|
||||
- name: GAS_USED
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
|
||||
|
||||
@ -20,4 +20,4 @@ WHERE
|
||||
block_number
|
||||
FROM
|
||||
last_3_days
|
||||
)
|
||||
)
|
||||
|
||||
@ -6,7 +6,7 @@ models:
|
||||
combination_of_columns:
|
||||
- BLOCK_NUMBER
|
||||
- TX_POSITION
|
||||
- TRACE_ADDRESS
|
||||
- TRACE_INDEX
|
||||
columns:
|
||||
- name: BLOCK_NUMBER
|
||||
tests:
|
||||
@ -14,18 +14,21 @@ models:
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- NUMBER
|
||||
- FLOAT
|
||||
- name: TX_POSITION
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- NUMBER
|
||||
- FLOAT
|
||||
- name: TRACE_ADDRESS
|
||||
tests:
|
||||
- not_null
|
||||
- name: PARENT_TRACE_ADDRESS
|
||||
- FLOAT
|
||||
- name: BLOCK_TIMESTAMP
|
||||
tests:
|
||||
- not_null:
|
||||
where: TRACE_ADDRESS <> 'ORIGIN'
|
||||
where: NOT IS_PENDING
|
||||
- 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: TX_HASH
|
||||
tests:
|
||||
- not_null:
|
||||
where: NOT IS_PENDING
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
|
||||
@ -14,7 +14,7 @@ SELECT
|
||||
FROM
|
||||
{{ ref("silver_testnet__transactions") }}
|
||||
tx
|
||||
LEFT JOIN {{ ref("testnet__fact_traces") }}
|
||||
LEFT JOIN {{ ref("silver_testnet__traces") }}
|
||||
tr
|
||||
ON tx.block_number = tr.block_number
|
||||
AND tx.tx_hash = tr.tx_hash
|
||||
|
||||
Loading…
Reference in New Issue
Block a user