version: 2
models:
  - name: silver__votes_agg_block
    tests:
      - dbt_utils.unique_combination_of_columns:
          combination_of_columns:
            - BLOCK_ID
          where: block_timestamp::date >= current_date - 2
    columns:
      - name: BLOCK_TIMESTAMP
        description: "{{ doc('block_timestamp') }}"
        tests:
          - not_null:
              where: block_id > 39824213
          - dbt_expectations.expect_row_values_to_have_recent_data:
              datepart: day
              interval: 2
      - name: BLOCK_ID
        description: "{{ doc('block_id') }}"
        tests:
          - not_null
      - name: NUM_VOTES
        description: The number of vote events that occurred within the block
        tests: 
          - not_null