mirror of
https://github.com/FlipsideCrypto/movement-models.git
synced 2026-02-06 16:01:57 +00:00
tweak tests and docs
This commit is contained in:
parent
d269fbbcdb
commit
6b844e4c71
@ -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.
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user