From 8a61959edc5eb03ee6f118c083e9f8a8ef7b215f Mon Sep 17 00:00:00 2001 From: gregoriustanleyy Date: Mon, 9 Jun 2025 19:27:13 +0700 Subject: [PATCH] changes --- models/gold/core/core__dim_ft_contract_metadata.sql | 2 +- models/gold/core/core__dim_ft_contract_metadata.yml | 4 ---- models/silver/labels/silver__ft_contract_metadata.sql | 6 +++--- .../token_metadata/omni/streamline__omni_tokenlist.sql | 4 ++-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/models/gold/core/core__dim_ft_contract_metadata.sql b/models/gold/core/core__dim_ft_contract_metadata.sql index 7ec50b3..e230edc 100644 --- a/models/gold/core/core__dim_ft_contract_metadata.sql +++ b/models/gold/core/core__dim_ft_contract_metadata.sql @@ -17,4 +17,4 @@ SELECT FROM {{ ref('silver__ft_contract_metadata') }} WHERE - name is not null OR symbol is not null + name is not null OR symbol is not null OR decimals is not null diff --git a/models/gold/core/core__dim_ft_contract_metadata.yml b/models/gold/core/core__dim_ft_contract_metadata.yml index d738e73..16bf9f8 100644 --- a/models/gold/core/core__dim_ft_contract_metadata.yml +++ b/models/gold/core/core__dim_ft_contract_metadata.yml @@ -19,12 +19,8 @@ models: description: "{{ doc('contract_address') }}" - name: NAME description: "{{ doc('name') }}" - tests: - - not_null - name: SYMBOL description: "{{ doc('symbol') }}" - tests: - - not_null - name: DECIMALS description: "{{ doc('decimals') }}" - name: DIM_FT_CONTRACT_METADATA_ID diff --git a/models/silver/labels/silver__ft_contract_metadata.sql b/models/silver/labels/silver__ft_contract_metadata.sql index 37c85ed..d8edb58 100644 --- a/models/silver/labels/silver__ft_contract_metadata.sql +++ b/models/silver/labels/silver__ft_contract_metadata.sql @@ -53,7 +53,7 @@ omni AS ( WHERE o.modified_timestamp >= ( SELECT - MAX(o.modified_timestamp) + MAX(modified_timestamp) FROM {{ this }} ) @@ -86,7 +86,7 @@ omni_unmapped AS ( AND o.modified_timestamp >= ( SELECT - MAX(o.modified_timestamp) + MAX(modified_timestamp) FROM {{ this }} ) @@ -109,7 +109,7 @@ defuse AS ( {% if is_incremental() %} WHERE - modified_timestamp >= ( + d.modified_timestamp >= ( SELECT MAX(modified_timestamp) FROM diff --git a/models/streamline/external/token_metadata/omni/streamline__omni_tokenlist.sql b/models/streamline/external/token_metadata/omni/streamline__omni_tokenlist.sql index a0f950c..6b9150d 100644 --- a/models/streamline/external/token_metadata/omni/streamline__omni_tokenlist.sql +++ b/models/streamline/external/token_metadata/omni/streamline__omni_tokenlist.sql @@ -1,9 +1,9 @@ {{ config ( materialized = "incremental", incremental_strategy = 'merge', - incremental_predicates = ["dynamic_range_predicate","modified_timestamp::date"], - unique_key = "omni_tokenlist_id", + unique_key = "omni_asset_identifier", cluster_by = ['modified_timestamp::DATE'], + post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(omni_asset_identifier);", tags = ['streamline_non_core'] ) }}