Created
July 19, 2019 18:57
-
-
Save tkaemming/951bb0715fb7683ce243a1994b90dbea to your computer and use it in GitHub Desktop.
ClickHouse Table Schema for Tracking Call Timing and Similarity with Service Delegator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good table, Ted.