offdata ai — agentic AI for data modelers and data engineers

Dimensional Modeling

AI dimensional modeling & star schema generator

Describe your business processes and OffDataAI builds the Kimball star schema — fact tables at the right grain, conformed dimensions with surrogate keys, and SCD2 history — then ships native DDL and a dbt project with marts and tests.

marts/star_schema.sqldimensional · ddl
-- Conformed dimension (SCD2)
CREATE TABLE marts.dim_product (
  product_sk    BIGINT      NOT NULL,   -- surrogate key
  product_id    VARCHAR     NOT NULL,   -- natural key
  name          VARCHAR,
  category      VARCHAR,
  valid_from    DATE        NOT NULL,
  valid_to      DATE,
  is_current    BOOLEAN     NOT NULL,
  CONSTRAINT pk_dim_product PRIMARY KEY (product_sk)
);

-- Fact at transaction grain
CREATE TABLE marts.fct_sales (
  sale_id       VARCHAR     NOT NULL,
  date_sk       INT         NOT NULL,   -- FK -> dim_date
  product_sk    BIGINT      NOT NULL,   -- FK -> dim_product
  customer_sk   BIGINT      NOT NULL,   -- FK -> dim_customer
  quantity      INT         NOT NULL,
  amount        NUMERIC(18,2) NOT NULL,
  CONSTRAINT pk_fct_sales PRIMARY KEY (sale_id)
);

Good dimensional models start with grain, and grain is exactly what gets skipped when you model by hand. OffDataAI's interview agent confirms what one row of each fact represents before it generates anything, then produces a clean Kimball star (or snowflake) schema: fact tables with measures and foreign keys, conformed dimensions with surrogate keys, and SCD Type 2 history where you need point-in-time accuracy. The same model compiles to native DDL and a complete dbt project — staging, marts, schema tests, and seed data — for Snowflake, BigQuery, Databricks, Redshift, Postgres, Synapse, and Fabric.

What OffDataAI generates

  • Facts and conformed dimensions

    Fact tables with measures and foreign keys, and conformed dimensions shared across marts — the backbone of a Kimball model, generated for you.

  • Grain confirmed up front

    The interview agent pins down the grain of every fact before generating, so measures, keys, and dimensions all line up correctly.

  • SCD2 history done right

    Surrogate keys, valid_from / valid_to windows, and current-row flags — with the dbt snapshot logic to maintain history over time.

  • Star or snowflake schema

    Keep dimensions denormalized for a star, or normalize them for a snowflake schema. You choose; the generator shapes the model accordingly.

Frequently asked questions

Can OffDataAI generate a Kimball star schema?
Yes. Choose the Kimball paradigm and describe your domain. OffDataAI identifies your business processes and grain, then generates fact tables and conformed dimension tables with surrogate keys, foreign keys, and the measures and attributes that belong on each — a clean star schema ready to query.
Does it handle slowly changing dimensions (SCD2)?
Yes. Dimensions that need history get SCD Type 2 handling: surrogate keys, valid_from / valid_to windows, and a current-row flag. Facts reference the surrogate keys so point-in-time analysis is correct. The dbt project includes the snapshot logic to maintain it.
What's the difference between a star and a snowflake schema here?
A star schema keeps dimensions denormalized (one table per dimension); a snowflake schema normalizes dimensions into sub-tables. OffDataAI supports both — you choose, and the generator shapes the dimensions accordingly while keeping the fact grain intact.
How does OffDataAI decide the grain of a fact table?
The interview agent asks. Grain is the most important decision in dimensional modeling, so OffDataAI confirms exactly what one row of each fact represents (per transaction, per day, per event) before generating — and records it on the model so the measures and dimensions line up.
Can I generate the marts as a dbt project?
Yes. OffDataAI emits a complete dbt project — sources, staging models, and mart models for your facts and dimensions, with schema tests and seed data. dbt build works on the first run.

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.