Merge pull request #496 from FlipsideCrypto/AN-6495-prices

AN-6495/upd prices to not use crosschain
This commit is contained in:
Jack Forgash 2025-08-11 14:09:02 -04:00 committed by GitHub
commit 1abe167f38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 25 additions and 20 deletions

View File

@ -21,6 +21,3 @@ FROM
'crosschain_silver',
'complete_native_asset_metadata'
) }}
WHERE
blockchain = 'near protocol'
AND symbol = 'NEAR'

View File

@ -24,6 +24,3 @@ FROM
'crosschain_silver',
'complete_native_prices'
) }}
WHERE
blockchain = 'near protocol'
AND symbol = 'NEAR'

View File

@ -21,9 +21,3 @@ FROM
'crosschain_silver',
'complete_provider_asset_metadata'
) }}
WHERE
platform IN (
'NEAR Protocol',
'Near',
'near-protocol'
)

View File

@ -21,4 +21,3 @@ FROM
'crosschain_silver',
'complete_provider_prices'
) }}
-- prices for all ids

View File

@ -25,5 +25,3 @@ FROM
'crosschain_silver',
'complete_token_asset_metadata'
) }}
WHERE
lower(blockchain) IN ('near', 'near protocol')

View File

@ -28,5 +28,3 @@ FROM
'crosschain_silver',
'complete_token_prices'
) }}
WHERE
lower(blockchain) IN ('near', 'near protocol')

View File

@ -46,7 +46,7 @@ labels AS (
ORDER BY asset_identifier
) = 1)
),
prices_crosschain AS (
prices AS (
SELECT DISTINCT
token_address,
blockchain,
@ -57,7 +57,7 @@ prices_crosschain AS (
is_verified,
hour
FROM
{{ source('crosschain_price', 'ez_prices_hourly') }}
{{ ref('silver__complete_token_prices') }}
WHERE
NOT is_native
AND is_verified
@ -76,7 +76,7 @@ prices_native AS (
is_verified,
hour
FROM
{{ source('crosschain_price', 'ez_prices_hourly') }}
{{ ref('silver__complete_native_prices') }}
WHERE
is_native
AND is_verified

View File

@ -18,3 +18,9 @@ SELECT
complete_provider_asset_metadata_id AS dim_asset_metadata_id
FROM
{{ ref('silver__complete_provider_asset_metadata') }}
WHERE
platform IN (
'NEAR Protocol',
'Near',
'near-protocol'
)

View File

@ -20,6 +20,8 @@ SELECT
complete_token_asset_metadata_id AS ez_asset_metadata_id
FROM
{{ ref('silver__complete_token_asset_metadata') }}
WHERE
lower(blockchain) IN ('near', 'near protocol')
UNION ALL
SELECT
NULL AS token_address,
@ -36,3 +38,6 @@ SELECT
complete_native_asset_metadata_id AS ez_asset_metadata_id
FROM
{{ ref('silver__complete_native_asset_metadata') }}
WHERE
blockchain = 'near protocol'
AND symbol = 'NEAR'

View File

@ -22,6 +22,8 @@ SELECT
complete_token_prices_id AS ez_prices_hourly_id
FROM
{{ ref('silver__complete_token_prices') }}
WHERE
lower(blockchain) IN ('near', 'near protocol')
UNION ALL
SELECT
HOUR,
@ -40,3 +42,6 @@ SELECT
complete_native_prices_id AS ez_prices_hourly_id
FROM
{{ ref('silver__complete_native_prices') }}
WHERE
blockchain = 'near protocol'
AND symbol = 'NEAR'

View File

@ -18,3 +18,8 @@ SELECT
complete_provider_prices_id AS fact_prices_ohlc_hourly_id
FROM
{{ ref('silver__complete_provider_prices') }}
WHERE platform IN (
'NEAR Protocol',
'Near',
'near-protocol'
)

View File

@ -14,6 +14,7 @@ SELECT
high,
low,
CLOSE,
m.platform,
p.provider,
p.source,
p._inserted_timestamp,