solana-models/models/silver/nfts/silver__nft_compressed_mints.yml
desmond-hui 034e88e344
An 3943/get compressed nft addresses (#439)
* external funcs (wip)

* call compressed nft mint parser with external func

* ignore bronze_api models

* move to match standard location

* fix missing mints due to inconsistent ordering

* add a tag to bronze_api model, exclude accordingly

* update silver table to use new bronze api data

* wip

* handle non-mint events and multi mints per tx_id

* add regression test
2024-01-15 07:46:46 -08:00

74 lines
2.7 KiB
YAML

version: 2
models:
- name: silver__nft_compressed_mints
description: contains compressed mint data combining onchain transaction with offchain mint event
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- TX_ID
- MINT
- PURCHASER
- compare_model_subset:
name: silver__nft_compressed_mints_business_logic_test
compare_model: ref('testing__nft_compressed_mints')
compare_columns:
- tx_id
- mint
- leaf_owner
- collection_mint
- purchaser
- instruction_name
model_condition: "where tx_id in ('43nKZtMkpcKAJF5Sj9sekrVqM3StnTzuQkBqghzdgvWNDxoG3hTtQ8H2qHLaiYy4ogjErYxrAGShpfbKashFtqG9',
'43cY1oaPwhJeQGbVCbhN8Pw9JsfN8CjHJ8xoPstEPebDVaWX9ZrvUDNfNXrdM1HxyWfkkMXogFm1VdmjPmhU4NqE',
'4pvJwVszQfX8JWpNMvv1hmvduTigCVnZabcs9KbqwusbPFjTWxLJzHCvzHZVCrg7svHgzuqaACp7uxMNMqemRc4',
'3hnRu4Sp6s3pPKZ2pRCkrM1zQkC6HxrruKhDfBmX3qNbKn4mu4UL2M5W8JonnEn7zQKT3fpsSjyGu4qb5JbhXNZf',
'2mHjoyQ1fCnjeJk51ZiTU3RWXejjSsbzEgrEbHkgeRjQX4b5Y36FzLQzsKxYXpP8RcLeYPbuyMWXj4qfVGqa8cFD',
'rQ4y9cvCKYKYUZPcxn6MJMpxPo3LYDSJ85Y4jpN59k7KPb1niZrWoFJ6XqShfDdWrxCFccRJuXMqwV3N3aNr7W2')"
columns:
- name: BLOCK_TIMESTAMP
description: "{{ doc('block_timestamp') }}"
tests:
- not_null
- 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:
- dbt_expectations.expect_column_to_exist
- name: PROGRAM_ID
description: "{{ doc('program_id') }}"
tests:
- not_null
- name: PURCHASER
description: "{{ doc('purchaser') }}"
tests:
- not_null
- name: MINT_CURRENCY
description: "{{ doc('mint_currency') }}"
- name: MINT
description: "{{ doc('mint') }}"
tests:
- not_null
- name: LEAF_OWNER
description: "The account initializing the off-chain leaf"
- name: MINT_PRICE
description: "{{ doc('mint_price') }}"
- name: COLLECTION_MINT
description: "Address of the NFT collection"
tests:
- not_null
- name: INSTRUCTION_NAME
description: "Name of instruction being performed by the program"
tests:
- not_null
- name: _INSERTED_TIMESTAMP
description: "{{ doc('_inserted_timestamp') }}"
tests:
- not_null