All products

Write SQL with AI in DataHub

Draft a query against your own catalogue and see which table, definition or assumption supports each part of the answer.

To write SQL with AI in DataHub, start with a question someone needs answered. A request for monthly active subscriptions, for example, leaves room for two quite different measures. You might mean all subscriptions active at any point in March, or just those active on its final day. The datahub-sql-workflow skill looks for your organisation’s definition before selecting tables.

The agent checks the grain of each candidate table and inspects the fields it plans to use. A read-only warehouse connection lets it test uncertainties such as a join that might discard records. You can request the draft alone and review the SQL with a colleague.

What it does

  • Locate the warehouse table behind a model that appears in catalogue search.
  • Find the agreed treatment of suspended accounts before counting subscribers.
  • Check whether the reporting date follows an event or its later processing.
  • Identify evidence for excluding archived records from a headline number.
  • See which business definitions remain assumptions in the final answer.

Install and use

  1. Connect an authorised DataHub MCP with the SQL context and table inspection tools. Add a separate read-only warehouse connection if you want results.
  2. Ask for March’s active subscriptions, specify the reporting boundary and request a draft first.
  3. Review the cited sources and resolve any question about the measure before asking for execution.

FAQ

Source

Made by DataHub Project. Original skill: datahub-sql-workflow, published on GitHub under the Apache-2.0 licence.

View on GitHub