version: 2
models:
  - name: silver__blockchain
    tests: 
      - dbt_utils.unique_combination_of_columns:
          combination_of_columns:
            - BLOCK_ID
    columns:
      - name: CHAIN_ID
        tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_in_type_list:
              column_type_list:
                - STRING
                - VARCHAR
      - name: BLOCK_ID
        tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_in_type_list:
              column_type_list:
                - NUMBER
                - FLOAT
      - name: BLOCK_TIMESTAMP
        tests:
          - not_null
          - 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_SIZE
        tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_in_type_list:
              column_type_list:
                - NUMBER
                - FLOAT
      - name: BLOCK_HEADER
        tests:
          - not_null
      - name: BLOCK_ID_OBJECT
        tests:
          - not_null         
      - name: NUM_TXS
        tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_in_type_list:
              column_type_list:
                - NUMBER
                - FLOAT