mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
update clickhouse schema
This commit is contained in:
parent
e12d25677d
commit
508e23c52e
@ -20,7 +20,7 @@ CREATE TABLE pageview_queue (
|
|||||||
)
|
)
|
||||||
|
|
||||||
ENGINE = Kafka
|
ENGINE = Kafka
|
||||||
SETTINGS kafka_broker_list = '', -- input broker list
|
SETTINGS kafka_broker_list = 'localhost:9092,localhost:9093,localhost:9094', -- input broker list
|
||||||
kafka_topic_list = 'pageview',
|
kafka_topic_list = 'pageview',
|
||||||
kafka_group_name = 'pageview_consumer_group',
|
kafka_group_name = 'pageview_consumer_group',
|
||||||
kafka_format = 'JSONEachRow',
|
kafka_format = 'JSONEachRow',
|
||||||
@ -33,7 +33,7 @@ SELECT website_id,
|
|||||||
created_at,
|
created_at,
|
||||||
url,
|
url,
|
||||||
referrer
|
referrer
|
||||||
FROM umami.pageview_queue;
|
FROM pageview_queue;
|
||||||
|
|
||||||
-- Create Session
|
-- Create Session
|
||||||
CREATE TABLE session
|
CREATE TABLE session
|
||||||
@ -66,7 +66,7 @@ CREATE TABLE session_queue (
|
|||||||
country LowCardinality(String)
|
country LowCardinality(String)
|
||||||
)
|
)
|
||||||
ENGINE = Kafka
|
ENGINE = Kafka
|
||||||
SETTINGS kafka_broker_list = '', -- input broker list
|
SETTINGS kafka_broker_list = 'localhost:9092,localhost:9093,localhost:9094', -- input broker list
|
||||||
kafka_topic_list = 'session',
|
kafka_topic_list = 'session',
|
||||||
kafka_group_name = 'session_consumer_group',
|
kafka_group_name = 'session_consumer_group',
|
||||||
kafka_format = 'JSONEachRow',
|
kafka_format = 'JSONEachRow',
|
||||||
@ -94,8 +94,8 @@ CREATE TABLE event
|
|||||||
session_uuid UUID,
|
session_uuid UUID,
|
||||||
created_at DateTime('UTC'),
|
created_at DateTime('UTC'),
|
||||||
url String,
|
url String,
|
||||||
event_name String
|
event_name String,
|
||||||
event_data JSONB,
|
event_data String
|
||||||
)
|
)
|
||||||
engine = MergeTree PRIMARY KEY (event_uuid, created_at)
|
engine = MergeTree PRIMARY KEY (event_uuid, created_at)
|
||||||
ORDER BY (event_uuid, created_at)
|
ORDER BY (event_uuid, created_at)
|
||||||
@ -108,10 +108,10 @@ CREATE TABLE event_queue (
|
|||||||
created_at DateTime('UTC'),
|
created_at DateTime('UTC'),
|
||||||
url String,
|
url String,
|
||||||
event_name String,
|
event_name String,
|
||||||
event_data String,
|
event_data String
|
||||||
)
|
)
|
||||||
ENGINE = Kafka
|
ENGINE = Kafka
|
||||||
SETTINGS kafka_broker_list = '', -- input broker list
|
SETTINGS kafka_broker_list = 'localhost:9092,localhost:9093,localhost:9094', -- input broker list
|
||||||
kafka_topic_list = 'event',
|
kafka_topic_list = 'event',
|
||||||
kafka_group_name = 'event_consumer_group',
|
kafka_group_name = 'event_consumer_group',
|
||||||
kafka_format = 'JSONEachRow',
|
kafka_format = 'JSONEachRow',
|
||||||
@ -124,5 +124,7 @@ SELECT event_uuid,
|
|||||||
session_uuid,
|
session_uuid,
|
||||||
created_at,
|
created_at,
|
||||||
url,
|
url,
|
||||||
event_name
|
event_name,
|
||||||
|
event_data
|
||||||
FROM event_queue;
|
FROM event_queue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user