mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 14:11:54 +00:00
add modtimestamp
This commit is contained in:
parent
111c19cdca
commit
46f9e21029
@ -13,6 +13,7 @@ SELECT
|
||||
project_name,
|
||||
insert_date AS _load_timestamp,
|
||||
insert_date as _inserted_timestamp,
|
||||
modified_timestamp AS _modified_timestamp,
|
||||
_is_deleted,
|
||||
labels_combined_id
|
||||
FROM
|
||||
|
||||
@ -14,28 +14,42 @@ WITH address_labels AS (
|
||||
blockchain,
|
||||
address,
|
||||
creator,
|
||||
address_name,
|
||||
project_name,
|
||||
label_type,
|
||||
label_subtype,
|
||||
label_type AS l1_label,
|
||||
label_subtype AS l2_label,
|
||||
address_name,
|
||||
project_name,
|
||||
labels_combined_id,
|
||||
_is_deleted,
|
||||
_load_timestamp,
|
||||
_inserted_timestamp,
|
||||
_is_deleted,
|
||||
labels_combined_id as address_labels_id,
|
||||
SYSDATE() AS inserted_timestamp,
|
||||
SYSDATE() AS modified_timestamp,
|
||||
'{{ invocation_id }}' AS _invocation_id
|
||||
|
||||
_modified_timestamp
|
||||
|
||||
FROM
|
||||
{{ ref('bronze__address_labels') }}
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
{{ incremental_load_filter('modified_timestamp') }}
|
||||
{% endif %}
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
{{ incremental_load_filter('_modified_timestamp') }}
|
||||
{% endif %}
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
system_created_at,
|
||||
blockchain,
|
||||
address,
|
||||
creator,
|
||||
address_name,
|
||||
project_name,
|
||||
label_type,
|
||||
label_subtype,
|
||||
label_type AS l1_label,
|
||||
label_subtype AS l2_label,
|
||||
_load_timestamp,
|
||||
_inserted_timestamp,
|
||||
_modified_timestamp,
|
||||
_is_deleted,
|
||||
labels_combined_id as address_labels_id,
|
||||
SYSDATE() AS inserted_timestamp,
|
||||
SYSDATE() AS modified_timestamp,
|
||||
'{{ invocation_id }}' AS _invocation_id
|
||||
FROM
|
||||
address_labels
|
||||
|
||||
Loading…
Reference in New Issue
Block a user