From 6b39af7fa99cd981058e57143eb4f6b69ba3b768 Mon Sep 17 00:00:00 2001 From: tarikceric Date: Tue, 21 Oct 2025 16:32:28 -0700 Subject: [PATCH 1/3] set native token and disable other native models --- models/gold/price/price__ez_prices_hourly.sql | 5 ++++- .../silver/price/silver__complete_native_asset_metadata.sql | 2 +- models/silver/price/silver__complete_native_prices.sql | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/models/gold/price/price__ez_prices_hourly.sql b/models/gold/price/price__ez_prices_hourly.sql index aca5e4e..6d5098c 100644 --- a/models/gold/price/price__ez_prices_hourly.sql +++ b/models/gold/price/price__ez_prices_hourly.sql @@ -9,7 +9,10 @@ SELECT NAME, decimals, price, - FALSE AS is_native, + CASE + WHEN LOWER(token_address) = LOWER('0x1::aptos_coin::AptosCoin') THEN TRUE + ELSE FALSE + END AS is_native, is_deprecated, is_imputed, COALESCE( diff --git a/models/silver/price/silver__complete_native_asset_metadata.sql b/models/silver/price/silver__complete_native_asset_metadata.sql index 4566b9c..3abfc79 100644 --- a/models/silver/price/silver__complete_native_asset_metadata.sql +++ b/models/silver/price/silver__complete_native_asset_metadata.sql @@ -2,7 +2,7 @@ materialized = 'incremental', incremental_strategy = 'delete+insert', unique_key = 'complete_native_asset_metadata_id', - tags = ['core'] + tags = ['disabled'] ) }} SELECT diff --git a/models/silver/price/silver__complete_native_prices.sql b/models/silver/price/silver__complete_native_prices.sql index b42bb46..6429cc4 100644 --- a/models/silver/price/silver__complete_native_prices.sql +++ b/models/silver/price/silver__complete_native_prices.sql @@ -3,7 +3,7 @@ incremental_strategy = 'delete+insert', unique_key = 'complete_native_prices_id', cluster_by = ['HOUR::DATE'], - tags = ['core'] + tags = ['disabled'] ) }} SELECT From 44d46d5b9503a609c366cbd2d67c4ab45957285d Mon Sep 17 00:00:00 2001 From: tarikceric Date: Wed, 22 Oct 2025 11:05:35 -0700 Subject: [PATCH 2/3] case to set 0xa as native --- models/gold/price/price__ez_prices_hourly.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/models/gold/price/price__ez_prices_hourly.sql b/models/gold/price/price__ez_prices_hourly.sql index 6d5098c..2b9de2d 100644 --- a/models/gold/price/price__ez_prices_hourly.sql +++ b/models/gold/price/price__ez_prices_hourly.sql @@ -11,6 +11,13 @@ SELECT price, CASE WHEN LOWER(token_address) = LOWER('0x1::aptos_coin::AptosCoin') THEN TRUE + WHEN LOWER(token_address) = LOWER('0xa') + AND NOT EXISTS ( + SELECT 1 + FROM {{ ref('silver__hourly_prices_priority') }} aptos_coin + WHERE aptos_coin.hour = hourly_prices_priority.hour + AND LOWER(aptos_coin.token_address) = LOWER('0x1::aptos_coin::AptosCoin') + ) THEN TRUE ELSE FALSE END AS is_native, is_deprecated, From ae0aa3238642399bf355bb2916fc4ec86f0c078e Mon Sep 17 00:00:00 2001 From: tarikceric Date: Wed, 22 Oct 2025 11:30:18 -0700 Subject: [PATCH 3/3] set 0xa as native token --- models/gold/price/price__ez_prices_hourly.sql | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/models/gold/price/price__ez_prices_hourly.sql b/models/gold/price/price__ez_prices_hourly.sql index 2b9de2d..3a4f237 100644 --- a/models/gold/price/price__ez_prices_hourly.sql +++ b/models/gold/price/price__ez_prices_hourly.sql @@ -10,14 +10,7 @@ SELECT decimals, price, CASE - WHEN LOWER(token_address) = LOWER('0x1::aptos_coin::AptosCoin') THEN TRUE - WHEN LOWER(token_address) = LOWER('0xa') - AND NOT EXISTS ( - SELECT 1 - FROM {{ ref('silver__hourly_prices_priority') }} aptos_coin - WHERE aptos_coin.hour = hourly_prices_priority.hour - AND LOWER(aptos_coin.token_address) = LOWER('0x1::aptos_coin::AptosCoin') - ) THEN TRUE + WHEN LOWER(token_address) = LOWER('0xa') THEN TRUE ELSE FALSE END AS is_native, is_deprecated,