Skip to content

Instantly share code, notes, and snippets.

@tkaemming
Created Jul 19, 2019
Embed
What would you like to do?
ClickHouse Table Schema for Tracking Call Timing and Similarity with Service Delegator
CREATE TABLE calls (
-- Kafka Message Details
timestamp DateTime,
partition UInt8,
offset UInt64,
-- Call Signature
service String,
method String,
arguments Nested (
name String,
value String
),
-- Call Results
results Nested (
backend String,
started Nullable(UInt64), -- millisecond timestamp
finished Nullable(UInt64), -- millisecond timestamp
status Enum8(
'success' = 0,
'failure' = 1
),
exception_type Nullable(String),
similarity Nullable(Float32) -- [0.0, 1.0] (not similar to exact same) compared to baseline (first) result
)
-- Additional Tags
tags Nested (
name String,
value String
)
) ENGINE = MergeTree
PARTITION BY toDate(timestamp)
ORDER BY (service, method, timestamp)
@JTCunning

This comment has been minimized.

Copy link

@JTCunning JTCunning commented Jul 25, 2019

Good table, Ted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment