ATTACH TABLE _ UUID '9be1034d-e911-4280-94c0-05dcb911f3d3'
(
    `trace_id` UUID,
    `span_id` UInt64,
    `parent_span_id` UInt64,
    `operation_name` LowCardinality(String),
    `kind` Enum8('INTERNAL' = 0, 'SERVER' = 1, 'CLIENT' = 2, 'PRODUCER' = 3, 'CONSUMER' = 4),
    `start_time_us` UInt64,
    `finish_time_us` UInt64,
    `finish_date` Date,
    `attribute` Map(LowCardinality(String), String),
    `attribute.names` Array(LowCardinality(String)) ALIAS mapKeys(attribute),
    `attribute.values` Array(String) ALIAS mapValues(attribute)
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(finish_date)
ORDER BY (finish_date, finish_time_us, trace_id)
SETTINGS index_granularity = 8192
