add long and lat to events

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-05-09 21:49:56 +02:00
parent 4936ba1d40
commit 0975a20e17
6 changed files with 40 additions and 16 deletions

View File

@@ -15,7 +15,8 @@ CREATE TABLE openpanel.events (
`country` String,
`city` String,
`region` String,
`continent` String,
`longitude` Int16,
`latitude` Int16,
`os` String,
`os_version` String,
`browser` String,
@@ -77,6 +78,16 @@ ALTER TABLE
ADD
COLUMN id UUID DEFAULT generateUUIDv4() FIRST;
ALTER TABLE
events
ADD
COLUMN longitude Nullable(Int16);
ALTER TABLE
events
ADD
COLUMN latitude Nullable(Int16);
--- Materialized views (DAU)
CREATE MATERIALIZED VIEW dau_mv ENGINE = AggregatingMergeTree() PARTITION BY toYYYYMMDD(date)
ORDER BY