0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 09:14:46 +01:00
Commit Graph

15 Commits

Author SHA1 Message Date
ted kaemming
0944412f48
feat: Support marking materialized columns as disabled and dropping them (#26068) 2024-11-13 10:57:27 -08:00
ted kaemming
1544d3a0cf
refactor: Simplify materialized column implementation strategy switching (#26050) 2024-11-12 10:35:30 -06:00
Tom Owers
5513be7731
chore: upgraded Ruff linter (#18188)
* Upgraded Ruff linter

* Formatted whole codebase with new ruff rules

* Revert import removal

* Fixed mypi issues or added ignores

* Fixed schema formatting

* Fixed hogvm failing tests

* Remove duplicate key in list
2023-10-26 12:38:15 +02:00
Karl-Aksel Puulmann
91b20b0544
chore: remove clickhouse_is_replicated util (#14225) 2023-02-15 09:32:37 +02:00
Michael Matloka
5d2ad6c7bb
chore(deps): Update black to 22.8.0 (#11596)
* chore(deps): Update `black` to `22.8.0`

* Format
2022-09-05 14:38:54 +02:00
Eric Duong
92ddf4072b
feat: materialize person and groups on events (#11363) 2022-08-30 12:31:32 +01:00
Eric Duong
46faa8fab2
refactor(FOSS): foss remove all ee dependencies from /posthog (#10319)
* refactor: foss move properties to /posthog

* refactor: move replication and materializtaion

* refactor: move file

* refactor: move test and journeys

* refactor: move breakdown props

* refactor: move query imports

* refactor: move more ee dependencies

* refactor: restore groupsjoinquery

* fix: errors

* refactor: no ee.clickhouse dependncies

* try import tasks

* refactor: move materialization

* refactor: change foss split for column optimizer

* run black

* fix: imports

* remove comment

* Update snapshots

* run black

* skip isort

* Update snapshots

* format

* more fixes

* refactor(FOSS): split out paths query code (#10378)

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

* refactor: split out paths query code

* refactor: more code splitting

* fix: types

* refactor(FOSS): Setup such that FOSS is deployable (#10352)

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

* fix import

* refactor: add snapshost

* subscription-import

* fix: safe import

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 17:24:03 -04:00
Yakko Majuri
801c2a5f7e
feat(persons-on-events): add groups and persons columns to events schema (#9510)
* feat(persons-on-events): add persons and group cols to events

* snapshots

* Update ee/clickhouse/models/cohort.py

* update snapshots

* update kafka settings

* final modification to prevent temporary errors

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2022-04-29 11:31:32 +00:00
Yakko Majuri
c7d373364e
Revert "feat(persons-on-events): add required person and group columns to events table (#9251)" (#9406)
This reverts commit 3d71ad07cf.
2022-04-13 11:35:19 +00:00
Yakko Majuri
3d71ad07cf
feat(persons-on-events): add required person and group columns to events table (#9251)
* refactor(ingestion): establish setup for json consumption from kafka into clickhouse [nuke protobuf pt. 1]

* address review

* fix kafka table name across the board

* Update posthog/async_migrations/test/test_0004_replicated_schema.py

* run checks

* feat(persons-on-events): add required person and group columns to events table

* rename

* update snapshots

* address review

* Revert "update snapshots"

This reverts commit 63d7126e08.

* address review

* update snapshots

* update more snapshots

* use runpython

* update schemas

* update more queries

* some improvements :D

* fix naming

* fix breakdown prop name

* update snapshot

* fix naming

* fix ambiguous test

* fix queries'

* last bits

* fix typo to retrigger tests

* also handle kafka and mv tables in migration

* update snapshots

* drop tables if exists

Co-authored-by: eric <eeoneric@gmail.com>
2022-04-13 10:48:07 +00:00
Eric Duong
5eb98ef624
refactor: move event and person query to /posthog (#8970)
* refactor: move event and person query to /posthog

* move imports

* another import

* refactor: move actions

* refactor: move actions

* enterprise

* trigger tests

* test

* make dummy
2022-03-22 20:27:11 +00:00
Karl-Aksel Puulmann
c3649f91c9
feat(sharding): Remove CLICKHOUSE_REPLICATION (#9013)
* Check async migrations instead of CLICKHOUSE_REPLICATION for mat columns

* Update a comment

* Default for CLICKHOUSE_REPLICATION

* add replication file

* Assert is replicated in tests

* Remove DROP TABLE query from cohortpeople migration

* Update snapshots

* Ignore migration in typechecker

* Truncate right table

* Add KAFKA_COLUMNS to distributed tables
2022-03-16 10:27:39 +02:00
Karl-Aksel Puulmann
8e55d324d9
fix(sharding): Fix tests that would fail with CLICKHOUSE_REPLICATION (#8805)
* Make CLICKHOUSE_REPLICATION default to True

* Update some insert statements

* Create distributed tables during tests

* Delete from sharded_events

* Update test_migrations_not_required.py

* Improve 0002_events_sample_by is_required

1. SHOW CREATE TABLE is truncated if table has tens of materialized
columns, reasonably causing failures
2. We need to handle CLICKHOUSE_REPLICATED setups

* Update test_schema to handle CLICKHOUSE_REPLICATED, better test naming

* Fix issue with materialized columns

Note: Should make sure that these tests have coverage both ways

* Update test for recordings TTL

* Reorder table creation

* Correct schema for materialized columns on distributed tables

* Do correct setup in test_columns

* Lazily decide table to delete data from

* Make test_columns resilient to CLICKHOUSE_REPLICATION

* Make inserts resilient to CLICKHOUSE_REPLICATION

* Reset CLICKHOUSE_REPLICATION

* Create distributed tables conditionally

* Update snapshots, tests

* Fixup conftest
2022-03-07 13:51:38 +02:00
Karl-Aksel Puulmann
6cd14b712f
Quote ON CLUSTER statements (#8830)
Valid clickhouse clusters may contain dashes, which would cause syntax
errors without quoting
2022-03-03 13:29:39 +02:00
Karl-Aksel Puulmann
b6b2508233
Make marking materialized columns as MATERIALIZED stateless (#5831)
This simplifies the operational model a lot
2021-09-07 11:53:57 +00:00