version: 2
models:
  - name: silver__nft_sales_amm_sell
    tests:
      - dbt_utils.unique_combination_of_columns:
          combination_of_columns:
            - TX_ID
            - MINT
      - compare_model_subset:
          name: silver__nft_sales_amm_sell_business_logic_test
          compare_model: ref('testing__nft_sales_amm_sell')
          compare_columns: 
            - tx_id
            - purchaser
            - seller
            - mint
            - round(sales_amount,8)
          model_condition: "where tx_id in ('Ep7n5yUXoBiV6J3ntzvCqaGMS92NbQ9zdqS8ZMJVEwVGhKxsomKzGfsKzyHpzrb9s7ipLH4Cn5P88rneZEcm1Uy',
            '59fgrVMFqY1scM8gumej3kCq6gzhQauso41QzB9sMx72MdH5dQ76Z7ZHcPM8gWyecCB3mriwbng8uPZ5zEKgmVN1',
            '2yDoFY813NMMrFctpef8wxV4ktEt9Nn8kogJHSA6FBDdHpbezk6X21W2rbHK5tHLHsYBj7sdjNRDpHb9au2nEZT',
            '5cVLZm21xYLbhsi8zN2YJPacuKQjsaxcguJGZ2keP4vrGDKVJvazbvECSMaHoY5qVYWovVP53QC1scGX8rdTPUT',
            '39bf1gUcYqTuHnYTLPEbCGJ5NcpNBn8bkUGeVJxkRMRLuPP3SUaggdVcmDpHFUQSPJNq3wiCPvgzBTSwGWF53we',
            '46c3pCDa8hAuqiRN4SV3zwhuMz7XgDU6qrtsyzhkSXyJwjmeZ1TFsbxqnA15KCnPVLN1zNVUrouWJAskTX7v5uCF')"
    columns:
      - name: BLOCK_TIMESTAMP
        description: "{{ doc('block_timestamp') }}"
        tests:
          - not_null
          - dbt_expectations.expect_row_values_to_have_recent_data:
              datepart: day
              interval: 2
      - name: BLOCK_ID
        description: "{{ doc('block_id') }}"
        tests:
          - not_null
      - name: TX_ID
        description: "{{ doc('tx_id') }}"
        tests:
          - not_null
      - name: SUCCEEDED
        description: "{{ doc('tx_succeeded') }}"
        tests:
          - not_null
      - name: PROGRAM_ID 
        description: "{{ doc('program_id') }}"
        tests: 
          - not_null
      - name: PURCHASER
        description: "{{ doc('purchaser') }}"
        tests: 
          - not_null
      - name: SELLER
        description: "{{ doc('seller') }}"
        tests: 
          - not_null
      - name: MINT
        description: "{{ doc('mint') }}"
        tests: 
          - not_null:
              where: succeeded = TRUE
      - name: SALES_AMOUNT
        description: "{{ doc('sales_amount') }}"
        tests: 
          - not_null:
              where: succeeded = TRUE
      - name: MARKETPLACE
        description: "{{ doc('marketplace') }}"
        tests: 
          - not_null
      - name: _INSERTED_TIMESTAMP
        description: "{{ doc('_inserted_timestamp') }}"
        tests: 
          - not_null