[ ] Make a decision on int & float properties (all "number" properties are presented the JSON number aka the SQL float now). Do we want "int" properties?
[ ] Make a decision: move team_id guard into PREWHERE, or keep in WHERE
[ ] Add all OrDefault aggregations
[ ] Support empty strings '' and null strings 'null' in materialized properties.
[x] 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)
[x] Add support for tracking person property types. @macobo
[x] Create a technical/language document for HogQL, showing what is allowed and what isn't (we have the grammar)
Backend
[x] Create a /query endpoint, and add a router on the backend. At first support just the new EventsQuery
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.
HogQL / Data Exploration TODO
These are the next steps to work on. Scroll below for old completed points.
Insight conversion
https://github.com/PostHog/meta/issues/130
HogQL
int
&float
properties (all "number" properties are presented the JSONnumber
aka the SQLfloat
now). Do we want "int" properties?team_id
guard into PREWHERE, or keep in WHEREOrDefault
aggregations''
and null strings'null'
in materialized properties.persons
AND
filters intoraw_persons
subquery)HogQL feature completeness
Event explorer UX
Pivot tables
source
either HogQLQuery or EventsQueryInsights, Dashboards, Frontend
<Query query={} />
something any other React app can import and usedataNodeLogic
, 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
coalesce(url, screen)
and filters?where
part in the UI, and not exactly this loosely related PR)where
Bring back saved columnsNot happening, will save as insights instead.property_filter_to_hogql
abstractionHogQL
startOfDay
), and which not (evalMLMethod
).%
breaking things due to python'sstring.format
(moved vars to vars, but someone could still write a symbol thatf""
interprets down the line. Make sure we combine the query in a clear way)Backend
/query
endpoint, and add a router on the backend. At first support just the newEventsQuery
Pivot tables
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
where
for team_id when making queries in ClickHouseselect e.bla from events e
), conflict avoidance https://github.com/PostHog/posthog/pull/14185*
expansion on tables https://github.com/PostHog/posthog/pull/14271HogQLQuery
node in/query
https://github.com/PostHog/posthog/pull/14265dataNodeLogic
level https://github.com/PostHog/posthog/pull/14662countDistinct()
function https://github.com/PostHog/posthog/pull/14786toInt
) for event and person properties, per team https://github.com/PostHog/posthog/pull/14795/query
to/debug
https://github.com/PostHog/posthog/pull/14729Events table
Pivot tables
Consolidated 2023-12-07
HogQL
/query
API endpoint. Ideally autogenerated. https://github.com/PostHog/posthog.com/pull/6096==
and!=
https://github.com/PostHog/posthog/pull/16259tumble
doesn't work https://github.com/PostHog/posthog/pull/16000toDate(timestamp)
does not work. What's the alternative? https://github.com/PostHog/posthog/pull/16757if
when PoEv2 enabledwhere events.organization.name = 'PostHog'
) https://github.com/PostHog/posthog/pull/17950toDate(now())
(we aliastoDate
totoDateOrNull
, which only takes a String argument, not DateTime) https://github.com/PostHog/posthog/pull/16757/debug
view (add sidebar, better examples, etc)select session.duration
Data Exploration / Interlinking
EventsQuery().to_ast()
orHogQLQuery().to_ast()
{ kind: PersonsQuery, source: { kind: InsightQuery, day: 3, breakdown: 'fish' } }