near-models/models/silver/labels/silver__token_labels.sql
2025-05-02 10:54:47 -06:00

27 lines
521 B
SQL

{{ config(
materialized = 'view',
unique_key = 'token_contract',
tags = ['scheduled_non_core']
) }}
WITH labels_seed AS (
SELECT
token,
symbol,
token_contract,
decimals
FROM
{{ ref('seeds__token_labels') }}
)
SELECT
*,
{{ dbt_utils.generate_surrogate_key(
['token_contract']
) }} AS token_labels_id,
SYSDATE() AS inserted_timestamp,
SYSDATE() AS modified_timestamp,
'{{ invocation_id }}' AS _invocation_id
FROM
labels_seed