offdata ai — agentic AI for data modelers and data engineers

Text to SQL

Text to SQL — plain English to a validated schema

Write what your data looks like in plain English. OffDataAI turns it into validated SQL — full CREATE TABLE DDL with keys, types, and constraints — for every major warehouse, plus an ERD and a dbt project. Text to SQL that ships a real schema, not a throwaway query.

generated/schema.sqltext → sql
-- Prompt:
-- "Track support tickets. Each ticket belongs to a customer,
--  has a priority, a status, and many comments over time."

CREATE TABLE support.tickets (
  ticket_id     BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
  customer_id   BIGINT      NOT NULL REFERENCES support.customers (id),
  priority      TEXT        NOT NULL
                            CHECK (priority IN ('low','medium','high','urgent')),
  status        TEXT        NOT NULL DEFAULT 'open'
                            CHECK (status IN ('open','pending','closed')),
  opened_at     TIMESTAMPTZ NOT NULL DEFAULT now()
);

CREATE TABLE support.ticket_comments (
  comment_id    BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
  ticket_id     BIGINT      NOT NULL REFERENCES support.tickets (ticket_id),
  body          TEXT        NOT NULL,
  created_at    TIMESTAMPTZ NOT NULL DEFAULT now()
);

Most text-to-SQL tools translate one question into one SELECT. OffDataAI goes further: it turns your description into an entire, validated schema and the SQL to build it. Describe your data; the interview agent clarifies relationships and grain; OffDataAI compiles a typed model, checks referential integrity, and emits native DDL — Snowflake, BigQuery, Databricks, Redshift, Postgres, Synapse, or Fabric. Because everything comes from one validated model, the types are consistent, the foreign keys line up, and you also get an ERD, seed data, and a runnable dbt project. Refine it conversationally and the SQL regenerates.

What OffDataAI generates

  • English in, runnable DDL out

    Describe your data and get full CREATE TABLE statements with keys, types, and constraints — not a single ad-hoc query.

  • Validated, not guessed

    The schema passes referential-integrity and type checks before any SQL is emitted, so the output is consistent and runs the first time.

  • Every major SQL dialect

    The same description compiles to Snowflake, BigQuery, Databricks, Redshift, Postgres, Synapse, and Fabric — with native types and features.

  • Refine in plain English

    Ask for a new column, table, or a grain change. OffDataAI updates the model and regenerates the SQL, versioning every change.

Frequently asked questions

What does text to SQL mean in OffDataAI?
It means you write a plain-English description of your data and OffDataAI produces the SQL to create it — full CREATE TABLE DDL with keys, types, and constraints, not just a single SELECT. The schema is validated for referential integrity first, so the SQL is consistent and runnable.
How is this different from asking ChatGPT to write SQL?
A general chatbot can draft SQL, but it won't keep types consistent, won't enforce foreign-key integrity across many tables, and won't give you a runnable dbt project. OffDataAI runs a structured pipeline — interview, synthesize a typed model, validate, then generate — so the SQL is reproducible and warehouse-ready.
Which SQL dialects can it generate?
Snowflake, BigQuery (GoogleSQL), Databricks (Spark SQL / Delta), Amazon Redshift, PostgreSQL, Microsoft Synapse (T-SQL), and Microsoft Fabric. The same description compiles to each dialect with native types and platform features.
Does it only generate DDL, or also analytics models?
Both. You get DDL to create the schema, and you can choose a modeling paradigm (Kimball, Data Vault 2.0, or 3NF) to shape it for analytics. OffDataAI also emits a dbt project, seed data, and an ERD from the same model.
Can I refine the result conversationally?
Yes. Every result is a versioned model. Ask for changes in plain English — rename a column, add a table, change the grain — and OffDataAI updates the model and regenerates the SQL, with each change tracked as a new version.

Your data warehouse is one conversation away.

Describe your domain, or open one of 150+ production-grade templates. ERDs, DDL, and a complete dbt project — generated in under a minute.