Skip to content

UI: user-friendly schema editor for schema.yaml #1

@daniel-thom

Description

@daniel-thom

Motivation

schema.yaml controls which tables and columns the LLM sees in prompts. Today it must be hand-edited in a text editor. For end users (especially those hitting the GitHub Models 8k token limit), this is a developer task — they have to find the file, learn the two field shapes (columns allowlist vs. excluded_columns glob denylist), and re-run the project.

Proposal

Extend the web UI with a schema editor that lets users:

  • See the full list of introspected tables and columns from the live DB.
  • Toggle tables on/off (top-level allowlist).
  • Per table, toggle individual columns on/off, or enter glob patterns for excluded_columns.
  • Preview which columns end up exposed vs. hidden before saving.
  • Write the result back to <project>/schema.yaml in the same format datasight generate emits.

Notes

  • Live DB introspection is already available; filtering logic lives in src/datasight/schema.py::filter_tables and the config loader in src/datasight/config.py::load_schema_config.
  • Should preserve hand-edits where possible (round-trip safe) or at minimum warn before overwriting.
  • See docs: Limit the schema sent to the LLM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions