You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discovery does not reflect this. By default, get_posthog_table_names() in posthog/hogql/database/database.py returns a hardcoded list: events, groups, persons, sessions, logs and the system tables. posthog.* tables only appear with include_hidden=True, so autocomplete and the sidebar never suggest posthog.trace_spans.
Tables affected include posthog.trace_spans, posthog.trace_attributes, posthog.metrics and posthog.ai_events.
Proposal
Better error. When an unknown table name matches a child of the posthog node, say Unknown table 'trace_spans'. Did you mean 'posthog.trace_spans'?. This covers every current and future namespaced table.
Better discovery. List the user-facing posthog.* tables (at least posthog.trace_spans and posthog.metrics) in the default get_posthog_table_names() output, so they appear in autocomplete and the sidebar.
This keeps the namespace rule from #42595 intact. It does not add anything to the root namespace.
Problem
Users who query a newer PostHog table without the
posthog.prefix getUnknown tableand no hint about the fix.SELECT * FROM logsworks.SELECT * FROM trace_spansfails withUnknown table \trace_spans`. Onlyposthog.trace_spans` works.posthognamespace. Tables that existed before stay inROOT_TABLES__DO_NOT_ADD_ANY_MORE, so they work with or without the prefix.get_posthog_table_names()inposthog/hogql/database/database.pyreturns a hardcoded list:events,groups,persons,sessions,logsand the system tables.posthog.*tables only appear withinclude_hidden=True, so autocomplete and the sidebar never suggestposthog.trace_spans.Tables affected include
posthog.trace_spans,posthog.trace_attributes,posthog.metricsandposthog.ai_events.Proposal
posthognode, sayUnknown table 'trace_spans'. Did you mean 'posthog.trace_spans'?. This covers every current and future namespaced table.posthog.*tables (at leastposthog.trace_spansandposthog.metrics) in the defaultget_posthog_table_names()output, so they appear in autocomplete and the sidebar.This keeps the namespace rule from #42595 intact. It does not add anything to the root namespace.