offdataai
Amazon Redshift

AI Amazon Redshift schema generator

Describe your domain in plain English. Ship a Redshift warehouse — DDL with the right DISTKEY and SORTKEY choices, plus a complete dbt project.

  • From $1/month
  • 8 SQL targets
  • 174 templates
analytics.fct_order_line · Redshift2 nodes
DISTKEY(customer_id)COMPOUND SORTKEY(ordered_at)dim_store · DISTSTYLE AUTO
Compute node 1Compute node 2slice 0dim_storeslice 1dim_storeslice 2dim_storeslice 3dim_storeCOPY into fct_order_line
customer group 1customer group 2customer group 3customer group 4
DISTKEY(customer_id) puts each customer's rows on one slice; DISTSTYLE AUTO keeps small dimensions on every node; SORTKEY orders each slice.
Built for Redshift

What offdataai writes for Redshift

Distribution keyssql
1CREATE TABLE IF NOT EXISTS sales.fct_order_line (
2 order_line_id BIGINT NOT NULL,
3 customer_id BIGINT NOT NULL,
4 ordered_at TIMESTAMP NOT NULL,
5 net_amount NUMERIC(18,4),
6 PRIMARY KEY (order_line_id),
7 FOREIGN KEY (customer_id) REFERENCES sales.dim_customer(customer_id)
8)
9DISTKEY(customer_id)
10COMPOUND SORTKEY(ordered_at);

DISTKEY

on the join column when the model names one

DISTSTYLE AUTO

everywhere else, so Redshift decides

SORTKEY

compound, up to four columns

SUPER

for JSON and semi-structured columns

Types, mapped for Redshift

from the generator

Your model's logical types become native Redshift types.

stringVARCHAR(256)
textVARCHAR(MAX)
integerINTEGER
bigintBIGINT
decimalNUMERIC(18,4)
doubleDOUBLE PRECISION
booleanBOOLEAN
dateDATE
timestampTIMESTAMP
jsonSUPER
uuidVARCHAR(36)
binaryVARBYTE
Watch the demo

See it in action

A narrated walkthrough, recorded in the real app.

The difference

Redshift by hand, or generated

By hand

  • ○Choose a distribution style for every table yourself
  • ○Translate types to Redshift names one column at a time
  • ○Write ALTER statements by hand when the model changes

With offdataai

  • DISTKEY from the model's join hints, DISTSTYLE AUTO otherwise
  • Redshift types from one mapping, including SUPER and VARBYTE
  • Version diffs become Redshift ALTER statements
Your workflow

Where offdataai fits in your Redshift stack

1

Import your cluster

Point the Database Modeler at Redshift. It reads tables, columns and keys, never rows.

2

Model or remodel

Keep it 1:1, or reshape it as a star schema or Data Vault, with keys suggested where none were declared.

3

Generate Redshift DDL

DISTKEY, COMPOUND SORTKEY and Redshift types, schema by schema.

4

Run dbt on Redshift

A dbt project with a redshift profile, staging and marts, ready for dbt build.

Masking intent, recorded where Redshift can read it

Redshift has no native column masking, so offdataai records each PII column's masking strategy as a column comment and suggests the secure-view expression your analyst role should read instead.

1COMMENT ON COLUMN sales.dim_customer.email IS 'masking:hash; classification:pii';
2
3-- Suggested secure-view expressions:
4-- SELECT md5(email) AS email -- from sales.dim_customer
Capabilities

What offdataai generates

  • Redshift-native DDL

    DISTKEY, COMPOUND SORTKEY, DISTSTYLE AUTO, SUPER for semi-structured columns, and table comments — never generic ANSI SQL.

  • Kimball, Data Vault 2.0, or 3NF

    Three paradigms supported. Pick the one your team uses; the generator emits Redshift-native DDL for each.

  • Full dbt project

    dbt_project.yml, a profiles.yml example for dbt-redshift, sources, staging, marts, snapshots, schema tests, and seeds.

  • Keys in the right order

    Primary and foreign keys are declared, and tables are created parents first, so the script runs top to bottom.

Overview

Why teams choose offdataai

app.offdataai.com
Platform-native DDL, ready to copy, download or push to Git

Platform-native DDL, ready to copy, download or push to Git

  1. 01

    offdataai is purpose-built for Amazon Redshift.

  2. 02

    Our generator emits Redshift-native DDL with primary and foreign keys, Redshift types (VARCHAR, BIGINT, NUMERIC(p,s), SUPER), and table comments.

  3. 03

    With the AI interview, large facts get a DISTKEY on the dominant join column and a COMPOUND SORTKEY led by the date you filter on; tables without a key get DISTSTYLE AUTO.

  4. 04

    From the same conversation, you also get a complete dbt project for dbt-redshift.

Real output

The code it writes, not a sketch

This is the shape of what offdataai generates here, straight from the validated model. Copy it, download it, or push it to Git.

  • Redshift-native DDL
  • Kimball, Data Vault 2.0, or 3NF
  • Full dbt project
ddl/redshift.sqlredshift sql
1CREATE SCHEMA IF NOT EXISTS analytics;
2
3CREATE TABLE IF NOT EXISTS analytics.dim_customer (
4 customer_sk BIGINT NOT NULL,
5 customer_id VARCHAR(256) NOT NULL,
6 name VARCHAR(256),
7 plan_id VARCHAR(256),
8 effective_date TIMESTAMP NOT NULL,
9 expiry_date TIMESTAMP NOT NULL,
10 is_current BOOLEAN NOT NULL,
11 PRIMARY KEY (customer_sk)
12)
13DISTSTYLE AUTO;
14COMMENT ON TABLE analytics.dim_customer IS 'SCD2 customer dimension';
15
16CREATE TABLE IF NOT EXISTS analytics.fct_usage (
17 usage_id VARCHAR(256) NOT NULL,
18 customer_sk BIGINT NOT NULL,
19 plan_id VARCHAR(256) NOT NULL,
20 event_ts TIMESTAMP NOT NULL,
21 api_calls BIGINT NOT NULL,
22 PRIMARY KEY (usage_id),
23 FOREIGN KEY (customer_sk) REFERENCES analytics.dim_customer(customer_sk)
24)
25DISTKEY(customer_sk)
26COMPOUND SORTKEY(event_ts, customer_sk);

Generates native SQL and dbt for 8 platforms · connects live to Snowflake, Databricks, BigQuery, Redshift and Postgres

SnowflakeBigQueryDatabricksRedshiftPostgreSQLSynapseFabricDuckDBdbtSnowflakeBigQueryDatabricksRedshiftPostgreSQLSynapseFabricDuckDBdbt
FAQ

Frequently asked questions

Can offdataai generate Amazon Redshift DDL from plain English?
Yes. Describe your business domain in plain English. offdataai's interview agent gathers grain, cardinality, and distribution hints, synthesizes a typed Intermediate Representation, and emits Redshift-native DDL with DISTKEY, SORTKEY, primary and foreign keys, and table comments.
Does offdataai choose DISTKEY and SORTKEY automatically?
Yes, when you build with the AI interview. A physical-design step picks a DISTKEY for facts (usually the largest join column to a dimension) and up to four SORTKEY columns, usually a date first. Tables without a distribution key get DISTSTYLE AUTO, so Redshift decides.
Does it support compound vs. interleaved sort keys?
Compound sort keys only — the right choice for most analytical workloads. The generator emits COMPOUND SORTKEY and does not emit interleaved sort keys.
Does it support Kimball, Data Vault, and 3NF on Redshift?
Yes. All three paradigms are first-class on Redshift. The generator emits Redshift-native DDL for each paradigm.
Does it generate a dbt project for Redshift?
Yes. offdataai emits a complete dbt project for Redshift — dbt_project.yml, a profiles.yml example for dbt-redshift, sources, staging, marts (incremental facts), snapshots for SCD2 dimensions, schema tests, and seed CSVs.

Part of the offdataai platform

The business context behind accurate AI answers, built from the data model up.

See all six stages →
  1. 01DesignLogical, physical and dimensional models.
  2. 02GenerateSQL, dbt, documentation and migrations.
  3. 03DefineBusiness metrics, semantic models and ontology.
  4. 04ConnectReal warehouse schemas and metadata.
  5. 05GovernDrift, impact analysis, tests and approvals.
  6. 06ActivateMake trusted context available to AI agents.

This page covers Generate and Connect. Every stage works on the same model, so what you design here carries through to the rest.

Accuracy starts with context

Give your AI agents context they can trust.

Design the model, define what your metrics mean, and serve that context to every agent and BI tool, on the warehouse you already run.

Book a demoGet started

Self-serve plans available