From 30108b79e229e0b58dd226caeab49db25b0ad024 Mon Sep 17 00:00:00 2001 From: Jack Forgash Date: Mon, 24 Jul 2023 18:30:43 -0600 Subject: [PATCH 1/2] upd cluster on txs and inputs final --- models/silver/core/silver__inputs_final.sql | 2 +- models/silver/core/silver__transactions_final.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/silver/core/silver__inputs_final.sql b/models/silver/core/silver__inputs_final.sql index 37aff1e3..c8865820 100644 --- a/models/silver/core/silver__inputs_final.sql +++ b/models/silver/core/silver__inputs_final.sql @@ -2,8 +2,8 @@ materialized = 'incremental', incremental_strategy = 'delete+insert', unique_key = 'input_id', + cluster_by = ["block_numer", "tx_id"], tags = ["core"], - cluster_by = ["_inserted_timestamp::DATE", "_partition_by_block_id"], post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION" ) }} diff --git a/models/silver/core/silver__transactions_final.sql b/models/silver/core/silver__transactions_final.sql index 1e82f24a..53d7976c 100644 --- a/models/silver/core/silver__transactions_final.sql +++ b/models/silver/core/silver__transactions_final.sql @@ -2,7 +2,7 @@ materialized = 'incremental', incremental_strategy = 'delete+insert', unique_key = 'tx_id', - cluster_by = ["_inserted_timestamp::DATE", "block_number"], + cluster_by = ["block_numer", "tx_id"], tags = ["core"], post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION" ) }} From 530df2fe55cb7c9bce3afd66f6ee47defa74e182 Mon Sep 17 00:00:00 2001 From: Jack Forgash Date: Mon, 24 Jul 2023 18:35:55 -0600 Subject: [PATCH 2/2] typo --- models/silver/core/silver__inputs_final.sql | 2 +- models/silver/core/silver__transactions_final.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/silver/core/silver__inputs_final.sql b/models/silver/core/silver__inputs_final.sql index c8865820..ed756f55 100644 --- a/models/silver/core/silver__inputs_final.sql +++ b/models/silver/core/silver__inputs_final.sql @@ -2,7 +2,7 @@ materialized = 'incremental', incremental_strategy = 'delete+insert', unique_key = 'input_id', - cluster_by = ["block_numer", "tx_id"], + cluster_by = ["block_number", "tx_id"], tags = ["core"], post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION" ) }} diff --git a/models/silver/core/silver__transactions_final.sql b/models/silver/core/silver__transactions_final.sql index 53d7976c..90feaabe 100644 --- a/models/silver/core/silver__transactions_final.sql +++ b/models/silver/core/silver__transactions_final.sql @@ -2,7 +2,7 @@ materialized = 'incremental', incremental_strategy = 'delete+insert', unique_key = 'tx_id', - cluster_by = ["block_numer", "tx_id"], + cluster_by = ["block_number", "tx_id"], tags = ["core"], post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION" ) }}