-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web-analytics): Add Sessions Table V2 (#23023)
* Add raw_sessions table * Fix * Change time chunking to 5 minutes * Add modes of operation, and some comments * WIP wire up sessions table V2 * More working v2 sessions tests * Optimize imports * Fix v1 sessions table test * Fix more tests * Fix channel type tests * Fix session replay joining with v2 * Web analytics queries and their tests working * Fix where clause extractor tests for v1 * Fix backfill script * Show last select query instead of first * Run ruff * Fix ids in tests * Fix database init * spelling * Fix test_query * Formatting * Handle session properties with v2 session table * Add more columns, fix some properties * Add new properties to taxonomy * Fix trends tests * Fix modifiers * Set v1 sessions table to default * Capture viewport size * Fix keyword arg rename * Update query snapshots * Update query snapshots * Fix test_utils * Fix test_trends * Make it easier to run test_parser_cpp from pytcharm * Update query snapshots * Update query snapshots * Add last external click url to the sessions MV * Update query snapshots * Add test_last_external_click_url * Add ingest from date * Run schema build after a rebase * Tweak test_all * Update query snapshots * Run schema after rebase * Update query snapshots * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * Change ingestion date and add explaining comment --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
4dc0bf2
commit bf8f4da
Showing
44 changed files
with
2,777 additions
and
369 deletions.
There are no files selected for viewing
Binary file modified
BIN
-398 Bytes
(100%)
..._snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
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
16 changes: 16 additions & 0 deletions
16
posthog/clickhouse/migrations/0064_sessions_with_uuidv7.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from posthog.clickhouse.client.migration_tools import run_sql_with_exceptions | ||
from posthog.models.raw_sessions.sql import ( | ||
DISTRIBUTED_RAW_SESSIONS_TABLE_SQL, | ||
WRITABLE_RAW_SESSIONS_TABLE_SQL, | ||
RAW_SESSIONS_VIEW_SQL, | ||
RAW_SESSIONS_TABLE_SQL, | ||
RAW_SESSIONS_TABLE_MV_SQL, | ||
) | ||
|
||
operations = [ | ||
run_sql_with_exceptions(WRITABLE_RAW_SESSIONS_TABLE_SQL), | ||
run_sql_with_exceptions(DISTRIBUTED_RAW_SESSIONS_TABLE_SQL), | ||
run_sql_with_exceptions(RAW_SESSIONS_TABLE_SQL), | ||
run_sql_with_exceptions(RAW_SESSIONS_TABLE_MV_SQL), | ||
run_sql_with_exceptions(RAW_SESSIONS_VIEW_SQL), | ||
] |
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
Oops, something went wrong.