---
title: "Connect SQL DDL"
description: "Give the column nobody can explain a definition your team governs and your agents act on."
slug: "sql"
type: connector
locale: en-US
canonical: "https://www.coremodels.io/connector/sql"
updatedAt: "2026-09-28T18:42:53+02:00"
last_updated: "2026-09-28T18:42:53+02:00"
---

# Connect SQL DDL

Give the column nobody can explain a definition your team governs and your agents act on.

Import SQL DDL and CoreModels records tables, columns, types, nullability, and keys as a governed model. Enumerations and meaning that `VARCHAR(32)` cannot say become taxonomies and documentation you can generate back into comments and constraints.

The one artifact in the platform that cannot be out of date is also the one that cannot say what it means. Six values in `status`, five in the app enum, four in the partner doc - all legal as far as the database is concerned.

DDL is honest about storage and silent about sense. Teams paper over that with check constraints they forget, lookup tables they do not join, and documents nobody diffs against production.

CoreModels treats SQL as a first-class import and export. Conversion recipes (including JSON Schema to SQL) make the target dialect explicit and the loss visible. Governed allowed values can ride in comments or in generated checks depending on what the engine will enforce.

Use this when the database is the last remaining source of truth - and you need it to stop being the last remaining source of confusion.

## Problem

- [The Column Nobody Can Explain](https://www.coremodels.io/connector/sql/h1-need): A partner feed starts rejecting rows at two in the morning. The cause is one column: `status`. Someone runs a `SELECT DISTINCT` against production and gets six values back. The application's enumeration has five. The integration document the partner was handed lists four. The column is declared `VARCHAR(32)`, so all six values are perfectly legal — the database was never told otherwise.

## Outcomes

- [Four Requests, One Schema, Nothing Retyped](https://www.coremodels.io/connector/sql/h2-outcomes): Here is a realistic week for whoever owns the customer schema in a mid-sized data platform.

## Governance

- [Who Signs Off on a Generated `CREATE TABLE`?](https://www.coremodels.io/connector/sql/h3-governance): A pull request lands. It contains a DDL file generated from a governed model, destined for a database real customers depend on. A reviewer has to decide whether to approve it.

## Ecosystem

- [SQL Is Everywhere, Which Is Exactly Why It Cannot Be the Center](https://www.coremodels.io/connector/sql/h4-ecosystem): Read enough data specifications and you notice how often they quote SQL inside themselves.

## Agents

- [An Agent Can Write Perfect DDL for the Wrong Database](https://www.coremodels.io/connector/sql/h5-agents): Language models are unusually good at writing SQL DDL. They have read an enormous amount of it, the grammar is regular, and the output looks right immediately.

## Quickstart

- [Your First DDL Transform Should Write Nothing: a SQL Quickstart](https://www.coremodels.io/connector/sql/t1-quickstart): The most accurate description of your data is almost certainly a `CREATE TABLE` statement sitting in a migrations folder. It is reviewed, versioned, and executable — and it is legible to exactly one kind of consumer. Getting it out of that folder and into a data contract, a JSON Schema, or another vendor's dialect is usually where the accuracy stops.

## API

- [Four Routes, One Envelope: SQL DDL on the CoreModels Transform API](https://www.coremodels.io/connector/sql/t2-api): | Route | Role | What it touches | |---|---|---| | `POST /graph/transform/schema/import/{projectId}` | Admin | writes the DDL's model into the project | | `POST /graph/transform/schema/export/{projectId}` | Viewer | reads the project, returns `CREATE TABLE` text | | `POST /graph/transform/schema/map/{projectId}` | Viewer (`ai`: Editor) | nothing — stateless, source in, target out | | `POST /graph/transform/plan/execute/{projectId}` | Viewer | nothing — replays a stored plan |

## MCP

- [Teaching an Agent to Read DDL: the transform_schema MCP Tool](https://www.coremodels.io/connector/sql/t3-mcp): A partner attaches `subscriber_dump.sql` to a ticket. Backticks, an `ENUM`, a `DATETIME`, and one column named by a DBA who shouts. Your canonical model is a JSON Schema in a repo. Somebody has to reconcile the two, and historically that somebody spent an afternoon in a diff viewer.

## Automation

- [Commit the Plan, Not the Guess: SQL Conversion Pipelines That Repeat](https://www.coremodels.io/connector/sql/t4-automation): Database teams solved schema-as-code years ago. DDL lives in git, migrations get reviewed, nobody types `ALTER TABLE` into production by hand. Then the schema has to leave the database — become a JSON Schema for the API team, a contract for the platform team, DDL for a second warehouse — and the discipline evaporates into a conversion script that one person ran once on a laptop.

## Deep dive

- [No Annotation Slot: How the SQL DDL Coder Carries Meaning, and Where It Stops](https://www.coremodels.io/connector/sql/t5-deep-dive): Every other format on the CoreModels transform surface has somewhere to put meaning. JSON Schema has `x-` keywords. Avro has custom attributes. LinkML has `slot_uri` and `meaning`. OWL *is* meaning. SQL DDL has a name, a type, and a handful of constraints — and no annotation slot at all.

## Sitemap

- [Sitemap in markdown](https://www.coremodels.io/sitemap.md)
