mirror of
https://github.com/FlipsideCrypto/flow-models.git
synced 2026-02-06 15:21:50 +00:00
* deprecation and new view * reorg * is_deprecated * deprecated * upd dbt model tag --------- Co-authored-by: forgash_ <jmfxyz@pm.me>
43 lines
801 B
SQL
43 lines
801 B
SQL
{{ config(
|
|
materialized = 'incremental',
|
|
incremental_strategy = 'delete+insert',
|
|
unique_key = 'complete_token_asset_metadata_id',
|
|
tags = ['scheduled_non_core']
|
|
) }}
|
|
|
|
SELECT
|
|
LOWER(
|
|
A.token_address
|
|
) AS token_address,
|
|
asset_id,
|
|
symbol,
|
|
NAME,
|
|
decimals,
|
|
blockchain,
|
|
blockchain_name,
|
|
blockchain_id,
|
|
is_deprecated,
|
|
provider,
|
|
source,
|
|
_inserted_timestamp,
|
|
inserted_timestamp,
|
|
modified_timestamp,
|
|
complete_token_asset_metadata_id,
|
|
_invocation_id
|
|
FROM
|
|
{{ ref(
|
|
'bronze__complete_token_asset_metadata'
|
|
) }} A
|
|
|
|
{% if is_incremental() %}
|
|
WHERE
|
|
modified_timestamp >= (
|
|
SELECT
|
|
MAX(
|
|
modified_timestamp
|
|
)
|
|
FROM
|
|
{{ this }}
|
|
)
|
|
{% endif %}
|