Dev (#2347)
* refactor(chalice): upgraded dependencies * refactor(chalice): upgraded dependencies feat(chalice): support heatmaps * feat(chalice): support table-of-browsers showing user-count * feat(chalice): support table-of-devices showing user-count * feat(chalice): support table-of-URLs showing user-count * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * fix(DB): fixed exp-sessions_mv
This commit is contained in:
parent
519b04433d
commit
a2e9f2b165
2 changed files with 65 additions and 4 deletions
|
|
@ -82,3 +82,61 @@ WHERE datetime >= now() - INTERVAL 7 DAY;
|
|||
|
||||
ALTER TABLE experimental.ios_events
|
||||
DROP COLUMN IF EXISTS coordinate;
|
||||
|
||||
DROP TABLE IF EXISTS experimental.sessions_l7d_mv;
|
||||
|
||||
CREATE MATERIALIZED VIEW IF NOT EXISTS experimental.sessions_l7d_mv
|
||||
ENGINE = ReplacingMergeTree(_timestamp)
|
||||
PARTITION BY toYYYYMMDD(datetime)
|
||||
ORDER BY (project_id, datetime, session_id)
|
||||
TTL datetime + INTERVAL 7 DAY
|
||||
SETTINGS index_granularity = 512
|
||||
POPULATE
|
||||
AS
|
||||
SELECT session_id,
|
||||
project_id,
|
||||
tracker_version,
|
||||
rev_id,
|
||||
user_uuid,
|
||||
user_os,
|
||||
user_os_version,
|
||||
user_browser,
|
||||
user_browser_version,
|
||||
user_device,
|
||||
user_device_type,
|
||||
user_country,
|
||||
user_city,
|
||||
user_state,
|
||||
platform,
|
||||
datetime,
|
||||
timezone,
|
||||
duration,
|
||||
pages_count,
|
||||
events_count,
|
||||
errors_count,
|
||||
utm_source,
|
||||
utm_medium,
|
||||
utm_campaign,
|
||||
user_id,
|
||||
user_anonymous_id,
|
||||
issue_types,
|
||||
referrer,
|
||||
base_referrer,
|
||||
issue_score,
|
||||
screen_width,
|
||||
screen_height,
|
||||
metadata_1,
|
||||
metadata_2,
|
||||
metadata_3,
|
||||
metadata_4,
|
||||
metadata_5,
|
||||
metadata_6,
|
||||
metadata_7,
|
||||
metadata_8,
|
||||
metadata_9,
|
||||
metadata_10,
|
||||
_timestamp
|
||||
FROM experimental.sessions
|
||||
WHERE datetime >= now() - INTERVAL 7 DAY
|
||||
AND isNotNull(duration)
|
||||
AND duration > 0;
|
||||
|
|
@ -341,6 +341,7 @@ SELECT session_id,
|
|||
user_state,
|
||||
platform,
|
||||
datetime,
|
||||
timezone,
|
||||
duration,
|
||||
pages_count,
|
||||
events_count,
|
||||
|
|
@ -350,6 +351,12 @@ SELECT session_id,
|
|||
utm_campaign,
|
||||
user_id,
|
||||
user_anonymous_id,
|
||||
issue_types,
|
||||
referrer,
|
||||
base_referrer,
|
||||
issue_score,
|
||||
screen_width,
|
||||
screen_height,
|
||||
metadata_1,
|
||||
metadata_2,
|
||||
metadata_3,
|
||||
|
|
@ -360,10 +367,6 @@ SELECT session_id,
|
|||
metadata_8,
|
||||
metadata_9,
|
||||
metadata_10,
|
||||
issue_types,
|
||||
referrer,
|
||||
base_referrer,
|
||||
issue_score,
|
||||
_timestamp
|
||||
FROM experimental.sessions
|
||||
WHERE datetime >= now() - INTERVAL 7 DAY
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue