mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 04:12:23 +01:00
79816a9715
* 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 |
||
---|---|---|
.. | ||
api | ||
benchmarks | ||
bin | ||
certs | ||
clickhouse | ||
idl | ||
kafka_client | ||
management/commands | ||
migrations | ||
models | ||
tasks | ||
__init__.py | ||
apps.py | ||
conftest.py | ||
docker-compose.ch.arm64.yml | ||
docker-compose.ch.test.yml | ||
docker-compose.ch.yml | ||
LICENSE | ||
pytest.ini | ||
settings.py | ||
urls.py |