add session replay to CH schema
This commit is contained in:
1 parent
3c0601f090
commit
3c3409e631
2 files changed
+35
No files matched your search
@@ -0,0 +1,17 @@
|
||||
-- Create session_replay
|
||||
CREATE TABLE umami.session_replay
|
||||
(
|
||||
replay_id UUID,
|
||||
website_id UUID,
|
||||
session_id UUID,
|
||||
chunk_index UInt32,
|
||||
events String CODEC(ZSTD(3)),
|
||||
event_count UInt32,
|
||||
started_at DateTime64(6),
|
||||
ended_at DateTime64(6),
|
||||
created_at DateTime64(6) DEFAULT now64(6)
|
||||
)
|
||||
ENGINE = MergeTree()
|
||||
PARTITION BY toYYYYMM(created_at)
|
||||
ORDER BY (replay_id, website_id, session_id, chunk_index)
|
||||
SETTINGS index_granularity = 8192;
|
||||
@@ -354,3 +354,21 @@ SELECT
|
||||
toStartOfHour(created_at) as created_at
|
||||
FROM umami.website_performance
|
||||
GROUP BY website_id, url_path, toStartOfHour(created_at);
|
||||
|
||||
-- Create session_replay
|
||||
CREATE TABLE umami.session_replay
|
||||
(
|
||||
replay_id UUID,
|
||||
website_id UUID,
|
||||
session_id UUID,
|
||||
chunk_index UInt32,
|
||||
events String CODEC(ZSTD(3)),
|
||||
event_count UInt32,
|
||||
started_at DateTime64(6),
|
||||
ended_at DateTime64(6),
|
||||
created_at DateTime64(6) DEFAULT now64(6)
|
||||
)
|
||||
ENGINE = MergeTree()
|
||||
PARTITION BY toYYYYMM(created_at)
|
||||
ORDER BY (replay_id, website_id, session_id, chunk_index)
|
||||
SETTINGS index_granularity = 8192;
|
||||
Reference in new issue
Block a user