Index of every page on this site: llms.txt
All skills
posthog avatar

/debugging-table-access-denied

@dde4e34 official
by posthogposthog/posthog41k stars
3,580
Run it yourself

Debugs 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".

Use this Skill: https://skilld.dev/gh/posthog/posthog/debugging-table-access-denied

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈89 tokens for metadata: the name and description. ≈355 when used: this file.

Description uses 4.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈358 characters, or 4.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Debugging "You don't have access to table"

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 table instead.
  • 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_id on the event usually means a userless Database.create_for — it fails closed, and bypass_warehouse_access_control does 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 via creator_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 AccessControl rows for the table's access_scope.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides debugging instructions for PostHog developers to investigate 'TableAccessDeniedError' in HogQL. It contains no executable code or security risks.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at dde4e34. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 6 days ago.

Activeupdated 3 months ago

README badge

README badge for posthog/posthog/debugging-table-access-denied