# datahub-sql-workflow

> Claude/Codex skill by [@datahub-project](https://omgskills.com/library/datahub-project/index.md) · 45 stars · Updated 2026-09-29

Ground text-to-SQL work in DataHub catalog evidence. Use when a user asks to write, draft, debug, or execute SQL; answer a data question that requires SQL; calculate a metric; query named tables; or investigate SQL results with DataHub MCP tools available. Always begin with find\_sql\_context, even when the user already supplied tables or dataset URNs, and call inspect\_tables\_for\_sql on the chosen tables before writing SQL.

## Install

```sh
git clone https://github.com/datahub-project/datahub-skills /tmp/datahub-skills && ln -s /tmp/datahub-skills/skills/datahub-sql-workflow ~/.claude/skills/datahub-sql-workflow
```

## From README

DataHub SQL Workflow Ground every query in DataHub evidence. Two tools carry that evidence: findsqlcontext(question) routes: it returns a card with the documents your organization wrote about the question, the candidate tables, and the saved query patterns that touch them. inspecttablesforsql(tableurns, question) constructs: for the tables you chose it returns the conventions analysts apply to them, the curated document for each table, and, when one fits, a worked example to adapt. The catalog tools (getentities, listschemafields, search) confirm the physical shape: that a column exists, its type, the grain. Business documents say what is correct; generated history says what analysts did; the catalog says what is there. Rank them in that order when they disagree (section 4). Require findsqlcontext and inspecttablesforsql. If either is missing, stop and ask the user to enable the DataHub MCP tools; do not fall back to other discovery tools, local files, memory, or the web.

## Links

- HTML page: https://omgskills.com/library/datahub-project/datahub-skills/skills/datahub-sql-workflow/
- GitHub: https://github.com/datahub-project/datahub-skills
- Author: [@datahub-project](https://omgskills.com/library/datahub-project/index.md)

## More from this repo

- [datahub-evals](https://omgskills.com/library/datahub-project/datahub-skills/skills/datahub-evals/index.md) — Used to run DataHub's saved evals and report answers for judging.
   - [@datahub-project](https://omgskills.com/library/datahub-project/index.md) · 45 stars
- [datahub-mfe-configure-app](https://omgskills.com/library/datahub-project/datahub-skills/skills/datahub-mfe-configure-app/index.md) — Configure a DataHub instance to load and display a Micro Frontend (MFE) app.
   - [@datahub-project](https://omgskills.com/library/datahub-project/index.md) · 45 stars
- [datahub-mfe-create-app](https://omgskills.com/library/datahub-project/datahub-skills/skills/datahub-mfe-create-app/index.md) — Scaffold a new DataHub Micro Frontend (MFE) app with all boilerplate files.
   - [@datahub-project](https://omgskills.com/library/datahub-project/index.md) · 45 stars
