mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 13:56:44 +00:00
commit
db8d82cea7
@ -1,9 +1,10 @@
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
incremental_predicates = ["COALESCE(DBT_INTERNAL_DEST.block_timestamp::DATE,'2099-12-31') >= (select min(block_timestamp::DATE) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
cluster_by = ['block_timestamp::DATE','_modified_timestamp::Date'],
|
||||
unique_key = 'transfers_event_id',
|
||||
incremental_strategy = 'delete+insert',
|
||||
incremental_strategy = 'merge',
|
||||
tags = ['curated','scheduled_non_core']
|
||||
) }}
|
||||
|
||||
@ -92,7 +93,7 @@ ft_transfers_final AS (
|
||||
SELECT
|
||||
*,
|
||||
{{ dbt_utils.generate_surrogate_key(
|
||||
['action_id']
|
||||
['tx_hash', 'action_id','contract_address','amount_unadj','from_address','to_address','memo','rn']
|
||||
) }} AS transfers_event_id,
|
||||
SYSDATE() AS inserted_timestamp,
|
||||
SYSDATE() AS modified_timestamp,
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
incremental_predicates = ["COALESCE(DBT_INTERNAL_DEST.block_timestamp::DATE,'2099-12-31') >= (select min(block_timestamp::DATE) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
cluster_by = ['block_timestamp::DATE','_modified_timestamp::Date'],
|
||||
unique_key = 'transfers_id',
|
||||
incremental_strategy = 'delete+insert',
|
||||
incremental_strategy = 'merge',
|
||||
tags = ['curated','scheduled_non_core']
|
||||
) }}
|
||||
|
||||
@ -83,7 +84,7 @@ ft_transfers_method AS (
|
||||
SELECT
|
||||
*,
|
||||
{{ dbt_utils.generate_surrogate_key(
|
||||
['action_id']
|
||||
['tx_hash', 'action_id','contract_address','amount_unadj','from_address','to_address','memo','rn']
|
||||
) }} AS transfers_id,
|
||||
SYSDATE() AS inserted_timestamp,
|
||||
SYSDATE() AS modified_timestamp,
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
incremental_predicates = ["COALESCE(DBT_INTERNAL_DEST.block_timestamp::DATE,'2099-12-31') >= (select min(block_timestamp::DATE) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
cluster_by = ['block_timestamp::DATE','_modified_timestamp::Date'],
|
||||
unique_key = 'transfers_liquidity_id',
|
||||
incremental_strategy = 'delete+insert',
|
||||
incremental_strategy = 'merge',
|
||||
tags = ['curated','scheduled_non_core']
|
||||
) }}
|
||||
|
||||
@ -85,7 +86,7 @@ add_liquidity AS (
|
||||
SELECT
|
||||
*,
|
||||
{{ dbt_utils.generate_surrogate_key(
|
||||
['action_id']
|
||||
['tx_hash', 'action_id','contract_address','amount_unadj','from_address','to_address','memo','rn']
|
||||
) }} AS transfers_liquidity_id,
|
||||
SYSDATE() AS inserted_timestamp,
|
||||
SYSDATE() AS modified_timestamp,
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
incremental_predicates = ["COALESCE(DBT_INTERNAL_DEST.block_timestamp::DATE,'2099-12-31') >= (select min(block_timestamp::DATE) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
cluster_by = ['block_timestamp::DATE','_modified_timestamp::Date'],
|
||||
unique_key = 'mint_id',
|
||||
incremental_strategy = 'delete+insert',
|
||||
incremental_strategy = 'merge',
|
||||
tags = ['curated','scheduled_non_core']
|
||||
) }}
|
||||
|
||||
@ -92,7 +93,7 @@ ft_mints_final AS (
|
||||
SELECT
|
||||
*,
|
||||
{{ dbt_utils.generate_surrogate_key(
|
||||
['action_id','rn']
|
||||
['tx_hash', 'action_id','contract_address','amount_unadj','from_address','to_address','memo','rn']
|
||||
)}} AS mint_id,
|
||||
SYSDATE() AS inserted_timestamp,
|
||||
SYSDATE() AS modified_timestamp,
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
incremental_predicates = ["COALESCE(DBT_INTERNAL_DEST.block_timestamp::DATE,'2099-12-31') >= (select min(block_timestamp::DATE) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
cluster_by = ['block_timestamp::DATE','_modified_timestamp::Date'],
|
||||
unique_key = 'transfers_orders_id',
|
||||
incremental_strategy = 'delete+insert',
|
||||
incremental_strategy = 'merge',
|
||||
tags = ['curated','scheduled_non_core']
|
||||
) }}
|
||||
|
||||
@ -86,7 +87,7 @@ orders_final AS (
|
||||
SELECT
|
||||
*,
|
||||
{{ dbt_utils.generate_surrogate_key(
|
||||
['action_id']
|
||||
['tx_hash', 'action_id','contract_address','amount_unadj','from_address','to_address','memo','rn']
|
||||
) }} AS transfers_orders_id,
|
||||
SYSDATE() AS inserted_timestamp,
|
||||
SYSDATE() AS modified_timestamp,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user