Skip to content
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

HogQL & Data Exploration next steps #81

Open
mariusandra opened this issue Dec 8, 2022 · 1 comment
Open

HogQL & Data Exploration next steps #81

mariusandra opened this issue Dec 8, 2022 · 1 comment

Comments

@mariusandra
Copy link
Contributor

mariusandra commented Dec 8, 2022

HogQL / Data Exploration TODO

These are the next steps to work on. Scroll below for old completed points.

Insight conversion

#130

HogQL

HogQL feature completeness

Event explorer UX

  • Why do we remove the http:// from the domains? (slack thread)
  • Clicking on cells should filter by value (normal cell), or drill down further (aggregation number cell).
  • "Load more" should also expand the time range when you're at the end of "last 24h".
  • Finish the lemon data grid
  • Implement UX feedback from feat(data-exploration): improved editing UX posthog#13726 (review)
  • Sorting by "event" with autocapture is odd (table says "clicked on" not "$autocapture bla bla", so sort order makes it not clear)

Pivot tables

  • Create a separate EventsPivotNode, source either HogQLQuery or EventsQuery
  • Add buttons to the events table and BI UI to make a pivot table

Insights, Dashboards, Frontend

  • Make <Query query={} /> something any other React app can import and use
  • Make the Query tag work within sidebar apps too.
  • Add throttling, caching and timeouts to dataNodeLogic, especially for dashboards.

Consolidated 2023-02-02

The lists above were getting long, so moved (2nd of Feb 2023) all the completed points below:

Events table

HogQL

  • Get basic HogQL expressions working for "select" and grouping
  • Get HogQL filtering working (including "having" and comparisons)
  • Figure out which clickhouse functions we want to enable (e.g. startOfDay), and which not (evalMLMethod).
  • Use HogQL expressions in property filters as a separate "sql expression" filter type
  • Create an interface to enter a HogQL expression in the app's UI
  • Support HogQL filters in all the filters and breakdowns
  • Add missing aggregations (count distinct property)
  • Fix problem with % breaking things due to python's string.format (moved vars to vars, but someone could still write a symbol that f"" interprets down the line. Make sure we combine the query in a clear way)
  • Add support for tracking person property types. @macobo
  • Create a technical/language document for HogQL, showing what is allowed and what isn't (we have the grammar)

Backend

  • Create a /query endpoint, and add a router on the backend. At first support just the new EventsQuery

Pivot tables

  • Map out the problem space on the query level
  • Add the relevant parameters to the data node queries and create a MVP

Insights, Dashboards, Frontend


Consolidated 2023-06-06

This list was pasted on the 6th of June, 2023 after launching the HogQL public beta.

HogQL

Internal RFC

Events table

Pivot tables

  • Implement Pivot tables MVP to prove it's doable
  • Implement pivot tables through HogQL

Consolidated 2023-12-07

HogQL

Data Exploration / Interlinking

  • Support AST reuse with EventsQuery().to_ast() or HogQLQuery().to_ast()
  • Support persons modal with { kind: PersonsQuery, source: { kind: InsightQuery, day: 3, breakdown: 'fish' } }
  • Backend support for custom SQL expressions feat(hogql): Expression Fields & PoEv2 posthog#18811
  • Subqueries you can save as views you can select from (not released?)
@mariusandra mariusandra changed the title Data Exploration next steps HogQL & Data Exploration next steps Jun 5, 2023
@danielthedifficult
Copy link

Just came here to say I love this feature, it's solving a problem I was trying to figure out myself just now, and that you're a beast for working on this.

@mariusandra mariusandra mentioned this issue Jun 5, 2024
51 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants