-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(hogql): cohort filter #14600
feat(hogql): cohort filter #14600
Conversation
fae814e
to
259fa21
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can query for cohorts
@@ -278,6 +278,35 @@ def hogql_table(self): | |||
return "session_recording_events" | |||
|
|||
|
|||
class CohortPeople(Table): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tangential to this PR but I wonder what stops these definitions and the actual table definitions from diverging other than people being careful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People are always careful :).
Good question. Noting really. I added "Lock down" tables for HogQL. Make sure we don't change something users might query on. Expose only what we deem relevant.
as a point to the list of all lists.
Problem
One of the things blocking the new event explorer is lack of cohort filters PostHog/meta#81
Changes
Implements cohort filters in a similar way I saw insights and the events table implement cohort filters.
Also makes it possible to query from cohort tables
How did you test this code?
Added tests.