Merge pull request 'fix: cast DateTime64 to DateTime in ClickHouse TTL expression' (#98) from feature/clickhouse-phase1 into main
Reviewed-on: cameleer/cameleer3-server#98
This commit is contained in:
@@ -10,5 +10,5 @@ CREATE TABLE IF NOT EXISTS agent_metrics (
|
|||||||
ENGINE = MergeTree()
|
ENGINE = MergeTree()
|
||||||
PARTITION BY (tenant_id, toYYYYMM(collected_at))
|
PARTITION BY (tenant_id, toYYYYMM(collected_at))
|
||||||
ORDER BY (tenant_id, agent_id, metric_name, collected_at)
|
ORDER BY (tenant_id, agent_id, metric_name, collected_at)
|
||||||
TTL collected_at + INTERVAL 365 DAY DELETE
|
TTL toDateTime(collected_at) + INTERVAL 365 DAY DELETE
|
||||||
SETTINGS index_granularity = 8192;
|
SETTINGS index_granularity = 8192;
|
||||||
|
|||||||
Reference in New Issue
Block a user