mirror of
https://github.com/FlipsideCrypto/flow-models.git
synced 2026-02-06 13:06:59 +00:00
so & clsutering (#341)
This commit is contained in:
parent
30ce62f6a0
commit
f6b98de014
@ -3,7 +3,8 @@
|
||||
unique_key = 'event_id',
|
||||
incremental_strategy = 'merge',
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
cluster_by = "_inserted_timestamp::date",
|
||||
cluster_by = "block_timestamp::date",
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_id,event_id,event_contract,event_type);",
|
||||
tags = ['core', 'streamline_scheduled', 'scheduled', 'scheduled_core']
|
||||
) }}
|
||||
|
||||
|
||||
@ -4,7 +4,8 @@
|
||||
unique_key = "tx_id",
|
||||
incremental_strategy = 'merge',
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
cluster_by = "_inserted_timestamp::date",
|
||||
cluster_by = "block_timestamp::date",
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_id,proposer,payer,authorizers);",
|
||||
tags = ['core', 'streamline_scheduled', 'scheduled', 'scheduled_core']
|
||||
) }}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
cluster_by = ['block_timestamp::DATE'],
|
||||
unique_key = 'swaps_final_id',
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_id,trader);",
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
cluster_by = ['_inserted_timestamp::DATE'],
|
||||
unique_key = 'nft_id',
|
||||
tags = ['livequery'],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(nft_id,nbatopshot_id);",
|
||||
full_refresh = False
|
||||
) }}
|
||||
{# NFT Metadata from legacy process lives in external table, deleted CTE and set FR=False
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
incremental_strategy = 'merge',
|
||||
unique_key = ['nft_id'],
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(nft_id);",
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
cluster_by = ['_inserted_timestamp::DATE'],
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = 'nft_allday_metadata_s_id',
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(nft_id,nflallday_id);",
|
||||
tags = ['nft']
|
||||
) }}
|
||||
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
cluster_by = ['_inserted_timestamp::DATE'],
|
||||
cluster_by = ['block_timestamp::DATE'],
|
||||
unique_key = 'tx_id',
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_id,nft_id,buyer,seller);",
|
||||
tags = ['nft', 'scheduled', 'streamline_scheduled', 'scheduled_non_core']
|
||||
) }}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'complete_native_prices_id',
|
||||
cluster_by = ['HOUR::DATE'],
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'complete_provider_prices_id',
|
||||
cluster_by = ['HOUR::DATE'],
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'complete_token_prices_id',
|
||||
cluster_by = ['HOUR::DATE'],
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
cluster_by = ['_inserted_timestamp::DATE'],
|
||||
cluster_by = ['block_timestamp::DATE'],
|
||||
unique_key = 'tx_id',
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_id,delegator);",
|
||||
tags = ['scheduled', 'streamline_scheduled', 'scheduled_non_core']
|
||||
) }}
|
||||
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
cluster_by = ['_inserted_timestamp::date'],
|
||||
cluster_by = ['block_timestamp::date'],
|
||||
unique_key = "CONCAT_WS('-', tx_id, sender, recipient, token_contract, amount)",
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_id,sender,recipient,token_contract);",
|
||||
tags = ['scheduled', 'streamline_scheduled', 'scheduled_non_core']
|
||||
) }}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user