tweak tests and docs

This commit is contained in:
Mike Stepanovic 2025-05-30 10:34:20 -06:00
parent d269fbbcdb
commit 6b844e4c71
3 changed files with 9 additions and 6 deletions

View File

@ -1,4 +1,4 @@
{% docs core__fact_transactions %}
{% docs core__fact_transfers %}
This table contains Deposit and Withdraw events on the Movement blockchain. Note: transfers with a 0 amount are excluded.

View File

@ -1,7 +1,8 @@
{{ config(
materialized = 'incremental',
unique_key = ['tx_hash','event_index','block_timestamp::DATE'],
unique_key = ['tx_hash','event_index','version','block_timestamp::DATE'],
incremental_strategy = 'merge',
incremental_predicates = ["dynamic_range_predicate", "block_timestamp::DATE"],
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE','modified_timestamp::DATE'],
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash, version, account_address,token_address);",
@ -20,9 +21,11 @@ SELECT
account_address,
amount,
token_address,
transfers_id AS fact_transfers_id,
inserted_timestamp,
modified_timestamp
{{ dbt_utils.generate_surrogate_key(
['tx_hash','event_index','version']
) }} AS fact_transfers_id,
SYSDATE() AS inserted_timestamp,
SYSDATE() AS modified_timestamp
FROM
{{ ref(
'silver__transfers'

View File

@ -381,7 +381,7 @@ models:
tests:
- not_null:
tags: ['test_quality']
- name: fact_transfers_id
- name: transfers_id
data_type: VARCHAR
- name: inserted_timestamp
data_type: TIMESTAMP_NTZ