solana-models/models/gold/defi/defi__fact_liquidity_pool_actions.yml
tarikceric 9848a298a8
Deprecate/orca init pools (#741)
* wip

* deprecate orca init pools

* view ref

* add note for newer orca pools
2024-12-19 10:26:07 -08:00

84 lines
3.3 KiB
YAML

version: 2
models:
- name: defi__fact_liquidity_pool_actions
description: Table containing liquidity pools actions on Orca, Raydium, Saber and Meteora. NOTE - actions for Orca pools created after 11/22/2024 are not tracked in this table, and we are working on updating our Orca data pipeline to collect these.
recent_date_filter: &recent_date_filter
config:
where: modified_timestamp >= current_date - 7
tests:
- reference_tx_missing:
reference_tables:
- 'silver__liquidity_pool_actions_raydium'
- 'silver__liquidity_pool_actions_orca'
- 'silver__liquidity_pool_actions_saber'
- 'silver__liquidity_pool_actions_meteora'
- 'silver__liquidity_pool_actions_meteora_dlmm'
- 'silver__liquidity_pool_actions_meteora_multi'
id_column: 'tx_id'
columns:
- name: BLOCK_TIMESTAMP
description: "{{ doc('block_timestamp') }}"
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- name: BLOCK_ID
description: "{{ doc('block_id') }}"
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- name: TX_ID
description: "{{ doc('tx_id') }}"
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- name: SUCCEEDED
description: "{{ doc('tx_succeeded') }}"
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- name: PROGRAM_ID
description: "{{ doc('program_id') }}"
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- name: ACTION
description: Type of interaction performed with the liquidity pool
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- name: LIQUIDITY_PROVIDER
description: "{{ doc('liquidity_provider') }}"
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- name: LIQUIDITY_POOL_ADDRESS
description: "{{ doc('liquidity_pool_address') }}"
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- name: AMOUNT
description: "{{ doc('amount') }}"
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- name: MINT
description: "{{ doc('mint') }}"
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- name: FACT_LIQUIDITY_POOL_ACTIONS_ID
description: '{{ doc("pk") }}'
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- unique: *recent_date_filter
- name: INSERTED_TIMESTAMP
description: '{{ doc("inserted_timestamp") }}'
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- name: MODIFIED_TIMESTAMP
description: '{{ doc("modified_timestamp") }}'
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter