Skip to content

HogQL & Data Exploration next steps #81

@mariusandra

Description

@mariusandra

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?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions