Skip to content

Commit

Permalink
Merge pull request #26 from isankadn/dev
Browse files Browse the repository at this point in the history
na
  • Loading branch information
isankadn authored Mar 25, 2024
2 parents 4cc6128 + 7913509 commit 7e99dcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion historical_data/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

Expand Down

0 comments on commit 7e99dcf

Please sign in to comment.