0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 04:12:23 +01:00
posthog/ee
Harry Waye 79816a9715
feat(retention): add support for multiple breakdown props (#7431)
* test(retention): add http api tests for retention breakdowns

This just adds tests for person and event property breakdowns

* Add helper function for substituting clickhouse sql params

* feat(retention): add support for multiple breakdown props

This just reuses the work done for funnel multiple breakdown values. I
haven't tested this with anything other than person or event properties.
Rather than try to get it working for all the other property types.

The change adds a new `breakdowns` parameter to the retention endpoint,
that is the same as for funnels, e.g. it looks like:

```
{
    ...
    "breakdowns": [{"type": "person", "property": "os"}, ...]
    ...
}
```

The return structure is the same as the non-breakdown version, except we
also include a `breakdown_values` property that is e.g. `["Chrome",
"95"]`, and the `label` attribute for this case would be "Chrome::95".

* fix typing

* update query snapshots

* remove unused imports

* use `self.assertEqual` instead of `assert`

* Remove explicit should_join_persons

* Revert limit by changes, use breakdown_type

* update snapshots

* fix typing

* use json_encode_request_params in retention test requests

* update json_encode_request_params to encode_get_request_params to better reflect purpose

* perf(retention): add benchmark query for retention with breakdown

* no materialize
2021-12-02 13:35:33 +00:00
..
api Update drf-exceptions-hog (#7417) 2021-12-01 17:19:51 -05:00
benchmarks feat(retention): add support for multiple breakdown props (#7431) 2021-12-02 13:35:33 +00:00
bin
certs
clickhouse feat(retention): add support for multiple breakdown props (#7431) 2021-12-02 13:35:33 +00:00
idl
kafka_client Make KAFKA_EVENTS_PLUGIN_INGESTION_TOPIC configurable (#7349) 2021-11-25 11:47:20 +01:00
management/commands Move is_clickhouse_enabled from posthog.ee to posthog.utils (#5902) 2021-09-11 01:43:24 +02:00
migrations Project-based permissioning framework (#5976) 2021-09-22 18:29:59 +02:00
models Make project based permissioning an enterprise feature (#7163) 2021-11-17 08:08:31 -06:00
tasks Update BE tracking to use groups (#7355) 2021-11-30 10:58:37 +02:00
__init__.py
apps.py
conftest.py [local testing] Track executed migrations when locally testing (#6915) 2021-11-08 10:40:05 -05:00
docker-compose.ch.arm64.yml dev(clickhouse): use prebuild arm64 clickhouse image (#7187) 2021-11-18 08:43:43 +00:00
docker-compose.ch.test.yml SAML deps build (#5932) 2021-09-14 11:43:26 +02:00
docker-compose.ch.yml Revert "Update the docker-compose dev environment to reflect prod better (include pgbouncer) (#6558)" (#6692) 2021-10-27 05:54:48 -07:00
LICENSE
pytest.ini Set debug, test, and primary_db env variables based on context (#7250) 2021-11-20 17:18:39 +00:00
settings.py Make KAFKA_EVENTS_PLUGIN_INGESTION_TOPIC configurable (#7349) 2021-11-25 11:47:20 +01:00
urls.py Project-based permissioning framework (#5976) 2021-09-22 18:29:59 +02:00