Allow Datasource Schema JSON Export
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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