version: 2
models:
  - name: silver__blocks
    tests:
      - dbt_utils.unique_combination_of_columns:
          combination_of_columns:
            - BLOCK_ID
    columns:
      - name: BLOCK_ID
        description: "{{ doc('block_id') }}"
        tests:
          - not_null
      - name: BLOCK_TIMESTAMP
        description: "{{ doc('block_timestamp') }}"
        tests:
          - not_null:
              where: block_id > 39824213
      - name: NETWORK
        description: solana network name
        tests:
          - not_null
      - name: CHAIN_ID
        description: chain identifier, this will always be solana.  Field is used in joins with crosschain tables
        tests:
          - not_null
      - name: BLOCK_HEIGHT
        description: heigh of the block
        tests:
          - not_null: 
              enabled: False #Null in bronze
      - name: BLOCK_HASH
        description: hash of the block
        tests:
          - not_null
      - name: PREVIOUS_BLOCK_ID
        description: previous slot value
        tests:
          - not_null
      - name: PREVIOUS_BLOCK_HASH
        description: previous block's hash value
        tests:
          - not_null
      - name: _INSERTED_DATE
        description: "{{ doc('_inserted_timestamp') }}"
        tests: 
          - not_null
