mirror of
https://github.com/FlipsideCrypto/solana-models.git
synced 2026-02-06 15:46:47 +00:00
* verified pricing * revert source * add ez bridge; coalesce for verified * use coalesce * use correct bridge cte
47 lines
973 B
SQL
47 lines
973 B
SQL
{{ config(
|
|
materialized = 'incremental',
|
|
incremental_strategy = 'delete+insert',
|
|
unique_key = 'complete_token_prices_id',
|
|
cluster_by = ['HOUR::DATE'],
|
|
post_hook = enable_search_optimization('{{this.schema}}', '{{this.identifier}}', 'ON EQUALITY(token_address,symbol)'),
|
|
tags = ['scheduled_non_core','scheduled_non_core_hourly']
|
|
) }}
|
|
|
|
SELECT
|
|
HOUR,
|
|
token_address,
|
|
asset_id,
|
|
symbol,
|
|
NAME,
|
|
decimals,
|
|
price,
|
|
blockchain,
|
|
blockchain_name,
|
|
blockchain_id,
|
|
is_imputed,
|
|
is_deprecated,
|
|
is_verified,
|
|
provider,
|
|
source,
|
|
_inserted_timestamp,
|
|
inserted_timestamp,
|
|
modified_timestamp,
|
|
complete_token_prices_id,
|
|
_invocation_id
|
|
FROM
|
|
{{ ref(
|
|
'bronze__complete_token_prices'
|
|
) }}
|
|
|
|
{% if is_incremental() %}
|
|
WHERE
|
|
modified_timestamp >= (
|
|
SELECT
|
|
MAX(
|
|
modified_timestamp
|
|
)
|
|
FROM
|
|
{{ this }}
|
|
)
|
|
{% endif %}
|