From 7913509833e86467677c1898db787235ba218d09 Mon Sep 17 00:00:00 2001 From: Isanka Date: Mon, 25 Mar 2024 13:58:57 +0900 Subject: [PATCH] na --- historical_data/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/historical_data/src/main.rs b/historical_data/src/main.rs index 4614d3f..fdfa5fd 100644 --- a/historical_data/src/main.rs +++ b/historical_data/src/main.rs @@ -311,7 +311,7 @@ async fn deduplicate_clickhouse_data( info!("processing duplicate data..."); let create_dedup_table_query = format!( - "CREATE TABLE {table}_dedup ENGINE = MergeTree() PARTITION BY toYYYYMM(created_at) PRIMARY KEY id ORDER BY (id, created_at) SETTINGS index_granularity = 8192 AS SELECT * FROM {table} GROUP BY id", + "CREATE TABLE {table}_dedup ENGINE = MergeTree() PARTITION BY toYYYYMM(created_at) PRIMARY KEY id ORDER BY (id, created_at) SETTINGS index_granularity = 8192 AS SELECT id, any(statement) AS statement, any(created_at) AS created_at FROM {table} GROUP BY id", table = full_table_name );