PostHog / PostHog/posthog

Allow Datasource Schema JSON Export

Open
#39,498 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
7h 27m
Merged PRs (30d)
222

Description

Feature request

Is your feature request related to a problem?

Problem: It is currently too difficult to get an LLM to generate posthog insight queries. As a user I want to be able to speak freely with any LLM about my data, with them having as much context as possible on the data.

Max is cool but not as capable as some other LLMs on codegen.

Describe the solution you'd like

I propose

Level 1:
Schema Export - Export the data of all your available tables

Level 2:
LLM Context Export - Export all of you schema as well as a single row per table so an LLM can gain insight into type information. Potentially make the data slice have some configuration options.

Describe alternatives you've considered

At the moment I've had to painstakingly describe my schema to the LLM, or manually make files which deliver enough context to generate the queries I'm after.

Additional context

Thank you!

Debug info
- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. First clarify whether Level 1 schema export or Level 2 LLM context export is in scope, then identify the datasource and table metadata entry points; done should mean an export containing the available table schemas, with sample rows and configuration only if Level 2 is accepted.

Written by the indexing model from the issue text.

Assessment

Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.