ATTACH TABLE _ UUID 'cc75e148-9558-4f31-b2f3-d34667f6e2df'
(
    `timeseries_name` String,
    `timeseries_key` UInt64,
    `field_name` String,
    `field_value` Int64,
    `last_updated_at` DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_i64_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + toIntervalDay(30)
SETTINGS index_granularity = 8192
