* JOIN in funnel trends query in a more optimal way
* Reformat funnel trends assert slightly
* Refactor `ClickhouseFunnelTrends` slightly
* Add `ClickhouseFunnelTrendsPersons` code
* Allow parametrization of funnel trends persons query
* Update test_funnel_trends.py
* Clean some funnel analysis code up
* Fix `drop_off` default in `FunnelTrendsPersonsMixin`
* Refactor for `ClickhouseFunnelTrends.get_step_counts_without_aggregation_query`
* Update test_funnel_trends.py
* Add an API test for funnel trends persons
* Use `FUNNEL_PERSONS_BY_STEP_SQL`
* Tests persons some more
* Remove unused imports
* Create funnel_time_to_convert.py
* Create test_funnel_time_to_convert.py
* Remove unused things
* Rework time to convert query to use our own SQL
* Add comments to query
* Fix typo in comment
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
* Use feedback
* Only override `ClickhouseFunnelTimeToConvert._format_results`
* Switch test users B and C around
* Fix typo
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
Co-authored-by: eric <eeoneric@gmail.com>
* wip: pagination for persons on clickhouse funnels
* wip: added offset support for getting a list of persons; added support for conversion window;
* fixed mypy exception
* helper function to insert data for local testing
* moved generate code into separate class for more functionality later
* corrected person_distinct_id to use the person id from postgres
* minor corrections to generate local class along with addition of data cleanup via destroy() method
* reduce the number of persons who make it to each step
* moved funnel queries to a new folder for better organization; separated funnel_persons and funnel_trends_persons into individual classes;
* funnel persons and tests
* initial implementation
* invoke the funnel or funnel trends class respectively
* add a test
* add breakdown handling and first test
* add test stubs
* remove repeats
* mypy corrections and PR feedback
* run funnel test suite on new query implementation
* remove imports
* corrected tests
* minor test updates
* correct func name
* fix types
* unordered step and test
* func name change
* move builder functions to funnel base
* add test classe for new funnel
* resolve issues with unordered funnel
* oops
* remove breakdown, fix mypy error
* Handle multiple same events in the funnel (#4863)
* dedup + tests
* deep equality. Tests to come
* write test for entity equality
* finish testing funnels
* clean up comments
* from O(2^N) to O(N)
* add query intuition blurb
* rm todo
* wip persons
* wip persons 2
* address comments
* test things, fix bugs
* match result format to funnel.py
Co-authored-by: Buddy Williams <buddy@posthog.com>
Co-authored-by: eric <eeoneric@gmail.com>
* adjust comment
* add caveat
* Clarify funnel trends description and terminology more
* Add a test to nail an assumption down
* Add `FunnelTrendsMixin` to `Filter` to control funnel trends better
* Fix `TestFunnelTrends
* Fix `FunnelTrendsMixin` method name
* Make mypy comfy
* Update dict keys in `TestFunnelTrends`
* Rework mixin
* Fix `test_to_dict`
* Move defaulting funnel trends steps from Filter mixin to query class
* Delete funnel_trends.py
* Update comment
Co-authored-by: eric <eeoneric@gmail.com>
* adjust comment
* add caveat
* Clarify funnel trends description and terminology more
* Add a test to nail an assumption down
* Fix `TestFunnelTrends
Co-authored-by: Michael Matloka <dev@twixes.com>
* wip: pagination for persons on clickhouse funnels
* wip: added offset support for getting a list of persons; added support for conversion window;
* fixed mypy exception
* helper function to insert data for local testing
* moved generate code into separate class for more functionality later
* corrected person_distinct_id to use the person id from postgres
* minor corrections to generate local class along with addition of data cleanup via destroy() method
* reduce the number of persons who make it to each step
* moved funnel queries to a new folder for better organization; separated funnel_persons and funnel_trends_persons into individual classes;
* funnel persons and tests
* initial implementation
* invoke the funnel or funnel trends class respectively
* add a test
* add breakdown handling and first test
* add test stubs
* remove repeats
* mypy corrections and PR feedback
* run funnel test suite on new query implementation
* remove imports
* corrected tests
* minor test updates
* correct func name
* fix types
* func name change
* Make `SHELL_PLUS_PRINT_SQL` clearer
* Add ClickhouseFunnelTrendsNew
* Create test_funnel_trends_new.py
* Create test_funnel_trends_v2.py
* move builder functions to funnel base
* add test classe for new funnel
* Inherit from `ClickhouseFunnelNew` and fix intervals
* Add proper formatting of trends results
* Clean tests up a little bit
* Group `FunnelWindowDaysMixin` tests in `test_funnel_persons`
* Rename `ClickhouseFunnelTrendsNew` things for clarity
* Port some original `ClickhouseFunnel` trends tests for the new query
* Only fetch initial page (100) of persons in trends query
* Describe assumptions and rename things
* Finish porting old ClickhouseFunnelTrends tests and add some new ones
* Remove unused imports
* Try to fix `test_period_not_final`
* Try to fix `test_period_not_final` again
* remove persons lists
* rename
* fix test
* add timezone to results
* add funnel trends new to api path
* revert random change
Co-authored-by: Buddy Williams <buddy@posthog.com>
Co-authored-by: eric <eeoneric@gmail.com>
* wip: pagination for persons on clickhouse funnels
* wip: added offset support for getting a list of persons; added support for conversion window;
* fixed mypy exception
* helper function to insert data for local testing
* moved generate code into separate class for more functionality later
* corrected person_distinct_id to use the person id from postgres
* minor corrections to generate local class along with addition of data cleanup via destroy() method
* reduce the number of persons who make it to each step
* moved funnel queries to a new folder for better organization; separated funnel_persons and funnel_trends_persons into individual classes;
* funnel persons and tests
* initial implementation
* invoke the funnel or funnel trends class respectively
* add a test
* add breakdown handling and first test
* add test stubs
* remove repeats
* mypy corrections and PR feedback
* run funnel test suite on new query implementation
* remove imports
* corrected tests
* minor test updates
* correct func name
* fix types
* func name change
* move builder functions to funnel base
* add test classe for new funnel
* Handle multiple same events in the funnel (#4863)
* dedup + tests
* deep equality. Tests to come
* write test for entity equality
* finish testing funnels
* clean up comments
Co-authored-by: Buddy Williams <buddy@posthog.com>
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
* wip: pagination for persons on clickhouse funnels
* wip: added offset support for getting a list of persons; added support for conversion window;
* fixed mypy exception
* helper function to insert data for local testing
* moved generate code into separate class for more functionality later
* corrected person_distinct_id to use the person id from postgres
* minor corrections to generate local class along with addition of data cleanup via destroy() method
* reduce the number of persons who make it to each step
* moved funnel queries to a new folder for better organization; separated funnel_persons and funnel_trends_persons into individual classes;
* funnel persons and tests
* invoke the funnel or funnel trends class respectively
* mypy corrections and PR feedback
* corrected tests
Co-authored-by: eric <eeoneric@gmail.com>