added a couple missing docs

This commit is contained in:
Mike Stepanovic 2025-04-22 11:47:14 -06:00
parent 94bcf3cf9c
commit 4cc9ec62a0
6 changed files with 117 additions and 1 deletions

View File

@ -79,6 +79,8 @@ There is more information on how to use dbt docs in the last section of this doc
- [defi.fact_switch_events](#!/model/model.thorchain_models.defi__fact_switch_events)
- [defi.fact_total_block_rewards](#!/model/model.thorchain_models.defi__fact_total_block_rewards)
- [defi.fact_total_value_locked](#!/model/model.thorchain_models.defi__fact_total_value_locked)
- [defi.fact_trade_account_deposit_events](#!/model/model.thorchain_models.defi__fact_trade_account_deposit_events)
- [defi.fact_trade_account_withdraw_events](#!/model/model.thorchain_models.defi__fact_trade_account_withdraw_events)
- [defi.fact_unstake_events](#!/model/model.thorchain_models.defi__fact_unstake_events)
- [defi.fact_update_node_account_status_events](#!/model/model.thorchain_models.defi__fact_update_node_account_status_events)
- [defi.fact_upgrades](#!/model/model.thorchain_models.defi__fact_upgrades)

View File

@ -23,7 +23,7 @@ WITH base AS (
)
SELECT
{{ dbt_utils.generate_surrogate_key(
['a.tx_id','a.event_id','a.contract_address']
['a.tx_id','a.event_id','a.contract_address', 'a.sender']
) }} AS fact_wasm_contracts_events_id,
b.block_timestamp,
COALESCE(

View File

@ -0,0 +1,27 @@
version: 2
models:
- name: core__fact_wasm_contracts_events
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- TX_ID
- EVENT_ID
- CONTRACT_ADDRESS
- SENDER
columns:
- name: TX_ID
description: "{{ doc('tx_id') }}"
- name: CONTRACT_ADDRESS
description: "Address of the wasm contract"
- name: CONTRACT_TYPE
description: "Type of the wasm contract"
- name: SENDER
description: "Address of the sender"
- name: ATTRIBUTES
description: "Attributes of the wasm contract"
- name: EVENT_ID
description: ""
- name: BLOCK_TIMESTAMP
description: "{{ doc('block_timestamp') }}"
- name: _INSERTED_TIMESTAMP
description: "{{ doc('inserted_timestamp') }}"

View File

@ -0,0 +1,27 @@
version: 2
models:
- name: silver__secure_asset_deposit_events
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- EVENT_ID
columns:
- name: AMOUNT_E8
tests:
- not_null
- name: ASSET
tests:
- not_null
- name: ASSET_ADDRESS
- name: RUNE_ADDRESS
tests:
- not_null
- name: TX_ID
tests:
- not_null
- name: EVENT_ID
tests:
- not_null
- name: BLOCK_TIMESTAMP
tests:
- not_null

View File

@ -0,0 +1,27 @@
version: 2
models:
- name: silver__secure_asset_withdraw_events
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- EVENT_ID
columns:
- name: AMOUNT_E8
tests:
- not_null
- name: ASSET
tests:
- not_null
- name: ASSET_ADDRESS
- name: RUNE_ADDRESS
tests:
- not_null
- name: TX_ID
tests:
- not_null
- name: EVENT_ID
tests:
- not_null
- name: BLOCK_TIMESTAMP
tests:
- not_null

View File

@ -0,0 +1,33 @@
version: 2
models:
- name: silver__wasm_contracts_events
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- TX_ID
- EVENT_ID
- CONTRACT_ADDRESS
- SENDER
columns:
- name: TX_ID
tests:
- not_null
- name: CONTRACT_ADDRESS
tests:
- not_null
- name: CONTRACT_TYPE
tests:
- not_null
- name: SENDER
- name: ATTRIBUTES
tests:
- not_null
- name: EVENT_ID
tests:
- not_null
- name: BLOCK_TIMESTAMP
tests:
- not_null
- name: _INSERTED_TIMESTAMP
tests:
- not_null