0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 18:26:15 +01:00
Commit Graph

10 Commits

Author SHA1 Message Date
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
Karl-Aksel Puulmann
17836f80f5
Add command for materializing columns (#5816)
* Add command for materializing columns

Expecting this to get used in both dev as well as when improving
upstream installations

* No clashes in tests

* Solve for feedback

* Comments for clarity
2021-09-07 07:56:29 +00:00
Karl-Aksel Puulmann
0df87579ab
Add more materialized column settings (#5806) 2021-09-04 18:07:20 +03:00
Karl-Aksel Puulmann
8d8705d1bb
Materialize person columns automatically (#5760)
* Hotfix: Use materialized columns on cloud

This was broken since default_kind was different on Distributed tables
on cloud

* Improve __init__.py

* Make reverting DEFAULT column async, only ON CLUSTER for events table
2021-08-28 12:14:30 +03:00
Karl-Aksel Puulmann
0d5df5d3ba
Hotfix: Use materialized columns on cloud (#5753)
This was broken since default_kind was different on Distributed tables
on cloud
2021-08-26 21:29:00 +03:00
Karl-Aksel Puulmann
10a26d3e17
Automatically create materialized properties (#5744)
* Avoid naming collisions when materializing columns

1. Prefix person properties differently. Mixing them up can break
ambigious column issues
2. When name already exists, suffix with random junk :)

* Implement analyze.py

* Add `suggested_columns_to_materialize`

* Add code to backfill a materialized column

* Add tests for backfilling data

* Cleanup

* Add tests for analyze

* WIP: Crontab for materializing columns

* Nooped task for materializing properties

* Use mutations_sync=0 for column tests

* Add comment
2021-08-26 18:48:57 +03:00
Eric Duong
bf51de1162
Funnel persons path (#5699)
* initial implementation

* add basic test

* move timestamp select

* fix tests and types

* fix test
2021-08-25 12:02:49 +01:00
Tim Glaser
92bd10ffa5
Speed up EE tests by not destroying tables (#5715)
* Speed up EE tests by not destroying tables

* Fix broken tests

* Speed up tests by not running migrations

* Fix last test

* req file?

* caching

* Parallel

* revert exp

* debug without parallel

* Revert "debug without parallel"

This reverts commit 83b3ad633f.

* Undo parallel tests

* Speed up more tests

* use final

* correct final

* print exception

* more prints

* move test

* add filter

* remove duplicate test

* prints here

* test wait

* set variable in query

* remove mutations_sync

* cleanup

Co-authored-by: eric <eeoneric@gmail.com>
2021-08-25 10:58:09 +02:00
Karl-Aksel Puulmann
020cb3b085
Only query event columns that are needed (#5610)
* Cache action lookups on entity

* Avoid mutating filters

* Single-line a long query line

* Calculate columns to select from table dynamically

* Rename class to ColumnOptimizer

* Improve typing

* Set logic

* Rename var

* Fetch funnel top values via materialized columns

* Add a cast

* Simplify, fix

* Move types to more logical place

* Add tests for ColumnOptimizer

* Tidy code

* Test whether elements_chain is needed or not

* No caching in tests

* Use `ColumnOptimizer` in trends

* Prepend commas

* Fix event_query tests

* Handle another edge case around elements_chain

* Handle funnel exclusions

* Add documentation around trickier pieces of logic

* Comment out a broken case for now
2021-08-19 10:17:40 +03:00
Karl-Aksel Puulmann
a860da9e90
Dynamic materialized columns (#5458)
* Add migration marking existing columns as materialized with a comment

* Add method to allow looking up materialized columns

* Add test for fetching and creating materialized columns

* Disable caching in tests

* Remove some callsites to CLICKHOUSE_DENORMALIZED_PROPERTIES

* Fixup caching logic

* Add (currently broken) test for denormalizing person properties

* Update funnel event query to work with new functionality

* Update other tests/queries

* Remove now-unused setting
2021-08-09 10:11:36 +03:00