Debugging "You don't have access to table"
SkillCommunicationDebugs a TableAccessDeniedError from an error tracking issue, Slack alert, or user report. Use when investigating why HogQL denied a system or warehouse table and whether the occurrence is a real bug or expected behavior. Trigger terms include TableAccessDeniedError, table_access_denied, and "You don't have access to table".
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Debugging "You don't have access to table" skill
What this skill tells your AI
The instructions your AI receives, as published by posthog/posthog-foss in .agents/skills/debugging-table-access-denied/SKILL.md and read by ahel’s review.
TableAccessDeniedError (posthog/hogql/errors.py, code table_access_denied) means the query referenced a table that access control removed from the HogQL schema.
The mechanism — how and why tables get removed — is documented in posthog/hogql/ACCESS_CONTROL.md; read it first.
Hints:
- The error proves the table exists and was denied. A nonexistent table raises
Unknown tableinstead. - On an HTTP request this is an expected 4xx, never captured. An error tracking issue means it was raised in a background context — figure out which from the event's query tags (
team_id,user_id,product,celery_task_id,temporal.*). - A
system.*name is a system-table decision; a bare name is a warehouse table/view denial. - No
user_idon the event usually means a userlessDatabase.create_for— it fails closed, andbypass_warehouse_access_controldoes not cover system tables. That's a bug in the calling code. - Background jobs run as the resource's
created_by; a creator who left the org is the known benign cause (cache warming, alerts, and exports already suppress capture for it viacreator_access_revoked). - Otherwise it's a real access rule (RBAC or entitlement) — see the readme for how a table's access level resolves, and check the
AccessControlrows for the table'saccess_scope.
Signals
- GitHub stars
- 715
- Forks
- 118
- Last commit
- Sep 2026
ahel recommends instead
Advanced
- Catalog kind
- skill
- Gateway key
debugging-table-access-denied-posthog- Source
- github.com/posthog/posthog-foss