MCP server
Let MCP-compatible assistants call selected Great Generator tools for local schema generation, DDL parsing, relational data, query coverage, and export.
Schema-first synthetic data for engineering teams
Great Generator helps data teams create realistic non-production datasets from schema contracts, JSON Schema, dbt metadata, data dictionaries, SQL DDL, Spark pipelines, lakehouse demos, CDC, anomalies, relational models, and deterministic advisor-reviewed generation.
Great Generator creates synthetic data. It does not anonymize, mask, de-identify, or transform production records.
from great_generator import generate_from_schema
schema = """
customer_id int,
customer_name string,
email string,
signup_date date,
account_status string,
balance decimal(12,2)
"""
df = generate_from_schema(schema=schema, rows=1000, seed=42)
print(df.head())
from great_generator import parse_ddl, generate_from_schema
ddl = """
CREATE TABLE sales.customers (
customer_id BIGINT PRIMARY KEY,
customer_name STRING NOT NULL,
email VARCHAR(120) UNIQUE,
signup_date DATE,
balance DECIMAL(12,2)
)
"""
contract = parse_ddl(ddl, dialect="databricks")
df = generate_from_schema(contract, rows=1000, seed=42)
Architecture
This diagram shows how schema ingestion, model understanding, generation, validation, metadata, and delivery fit together for data engineering, QA, analytics, Spark, and lakehouse workflows.
Install
Install with a hyphen. Import with an underscore.
pip install great-generator
pip install "great-generator[spark]"
pip install "great-generator[delta]"
pip install "great-generator[dbt]"
pip install "great-generator[schema-ingest]"
pip install "great-generator[ai]"
pip install "great-generator[anthropic]"
pip install "great-generator[ollama]"
pip install "great-generator[mcp]"
import great_generator
from great_generator import generate_from_schema
df = generate_from_schema("id int, name string", rows=100)
What is new
Recent work adds JSON Schema ingestion, dbt metadata ingestion, data dictionary ingestion, query-aware generation, SQL DDL contracts, advisor artifacts, optional MCP tools, and stronger launch documentation while keeping the base package lightweight.
Let MCP-compatible assistants call selected Great Generator tools for local schema generation, DDL parsing, relational data, query coverage, and export.
Generate synthetic data that contains required filter values, partition dates, selectivity targets, and relational join paths for SQL and pipeline tests.
Parse the documented ANSI, Spark, and Databricks `CREATE TABLE` subset into canonical contracts with stable fingerprints and parser diagnostics.
Generate synthetic DataFrames from API-style JSON Schema contracts using the documented v1 object/property subset.
Create synthetic model data from common dbt `schema.yml` and `manifest.json` metadata for analytics engineering tests.
Load CSV, YAML, or JSON data dictionaries and generate test data from enterprise schema documentation.
Use optional design-time advisors for schema understanding, column tagging, and realism review. Advisors produce JSON artifacts; they do not generate row data.
Inspect, edit, save, and reuse `GenerationPlan` and `ColumnTags`. The same schema, plan, seed, and arguments are designed to produce repeatable output.
Generate parent-child tables, CDC records, anomalies, SCD2 history, dimensional models, Data Vault-style examples, and Spark/Delta outputs.
Core workflows
df = generate_from_schema(schema, rows=1000)
data = generate_relational(
tables={
"customers": {"schema": "customer_id int primary key, customer_name string", "rows": 1000},
"orders": {"schema": "order_id int primary key, customer_id int references customers.customer_id", "rows": 5000},
}
)
contract = parse_ddl(ddl, dialect="databricks")
print(contract.fingerprint())
plan = infer_generation_plan(
"customer_id int, customer_name string, email string",
advisor="none"
)
df = generate_from_schema(
"customer_id int, customer_name string, email string",
rows=100,
plan=plan,
seed=42,
)
`advisor="none"` is the default and does not call a model.
Feature set
Generate synthetic DataFrames from mappings, DDL strings, DataFrames, Spark schemas, `TableSchema`, and domain schemas.
Use `parse_ddl(...)` for documented SQL `CREATE TABLE` contracts with stable fingerprints.
Generate from API contracts, analytics metadata, and enterprise schema documentation.
Recognize names, IDs, contacts, dates, amounts, statuses, quantities, and lifecycle fields from column names.
Include required filter values, partition dates, selectivity targets, and join paths when your tests need them.
Create parent-child tables with primary keys, foreign keys, and valid references by default.
Generate insert, update, and delete style records with event timestamps and ingestion timestamps.
Add opt-in nulls, duplicates, orphan keys, late records, outliers, invalid statuses, and negative amounts for data quality tests.
Create slowly changing dimension history tables for supported Pandas domain workflows.
Generate facts and dimensions for analytics engineering, BI examples, and warehouse modeling demos.
Create hubs, links, and satellites for architecture examples and modeling experiments.
Use Pandas locally or Spark in runtimes such as Databricks, Fabric Spark, EMR, Glue, and Synapse Spark.
Use convenience exports for CSV, JSON, Parquet, and Delta, or write returned DataFrames with native APIs.
Package repeatable generation scenarios as JSON, TOML, or simple YAML recipes and run them from the command line.
Create optional `GenerationPlan`, `ColumnTags`, and realism review artifacts before deterministic generation.
Record generation parameters, tables, validation checks, schema fingerprints, and optional advisor contribution.
Expose selected public APIs to local MCP clients with path checks, row limits, overwrite protection, file outputs, manifests, and previews.
Who this is for
Great Generator is designed for data engineers, QA engineers, analytics engineers, platform teams, Spark users, and developers who need realistic non-production datasets without using production records.
Common use cases
Generate test data from table schemas, DataFrame contracts, and SQL DDL definitions.
Create related data for joins, warehouse models, parent-child tests, and query examples.
Build CDC-style events and controlled dirty data for data quality validation.
Create Spark and Delta examples for notebooks, ETL tests, and lakehouse documentation.
Generate data that exercises filters, partitions, selectivity targets, and joins.
Review generation plans before producing deterministic synthetic datasets.
Schema inputs
| Input type | Example | Best for | Status |
|---|---|---|---|
| Plain Python mapping | `{"name": "string", "age": "int"}` | Fast schema-based generation | Supported |
| Rich mapping and custom rules | `custom_rules={"age": {"min": 18}}` | Business ranges, categories, patterns, and null rates | Supported through `custom_rules` |
| Pandas dtype mapping | `df.dtypes.to_dict()` | Pandas and notebook workflows | Supported |
| Pandas DataFrame schema | Empty or populated `DataFrame` | Preserve Pandas column names and dtypes | Supported |
| Compact DDL string | `"id int, name string"` | SQL-like quick starts | Supported |
| Full SQL `CREATE TABLE` DDL | `parse_ddl(ddl, dialect="databricks")` | Contracts from databases, warehouses, Spark, and lakehouse tables | Supported for documented subset |
| PySpark `StructType` | `StructType([...])` | Spark notebook schemas | Supported |
| PySpark DataFrame | Empty or populated Spark DataFrame | Use an existing Spark schema | Supported |
| `TableSchema` | `TableSchema(name="customers", ...)` | Library-native schema metadata | Supported |
| `DomainSchema` | Multi-table schema metadata | Relational and domain-shaped datasets | Supported |
| JSON Schema | `schema.json` | Application contracts | Supported |
| dbt schema.yml | `models/schema.yml` | Analytics engineering contracts | Supported |
| dbt manifest.json | `target/manifest.json` | Compiled dbt metadata | Supported |
| Data dictionary | `data_dictionary.csv` | Enterprise schema docs | Supported |
| Pydantic model | `BaseModel` | API model contracts | Planned |
| Dataclass | `@dataclass` | Python application models | Planned |
Query-aware generation
Query-aware generation creates synthetic data that contains the required values, partition dates, and join paths your SQL queries expect.
All query-aware options are optional. Existing behavior is unchanged unless users provide `required_values`, `partition_by`, `target_selectivity`, `ensure_join_coverage`, or `query_profile`.
Query-aware generation helps synthetic data match expected query values, partition dates, and join paths. It does not guarantee identical production performance because file layout, table statistics, clustering, caching, concurrency, warehouse size, and query engine configuration also affect runtime.
Current query-aware shaping is implemented for Pandas generation paths. Spark-native query-aware generation is planned; Spark users can continue using existing Spark generation paths and normal Spark writers.
df = generate_from_schema(
schema=schema,
rows=100000,
required_values={
"region": ["SOUTH"],
"product_type": ["CHECKING", "SAVINGS"],
},
partition_by={
"column": "business_date",
"values": ["2026-01-01", "2026-01-02"],
"distribution": "balanced",
},
target_selectivity={"region": {"SOUTH": 0.25}},
)
SQL DDL and contracts
Use `parse_ddl(...)` to parse documented SQL `CREATE TABLE` DDL into canonical contracts with stable fingerprints, table names, column order, normalized types, keys, relationships, constraints, comments, defaults, and selected Spark/Databricks metadata where supported.
The parser supports a documented subset of ANSI, Spark, and Databricks DDL. Unsupported syntax should produce clear diagnostics rather than silent assumptions.
from great_generator import parse_ddl, generate_from_schema
contract = parse_ddl(ddl, dialect="databricks", strict=True)
print(contract.fingerprint())
df = generate_from_schema(contract, rows=1000, seed=42)
Optional AI advisor layer
The advisor layer can propose a generation plan, tag columns, and review a sample for realism. Advisors do not generate row data. Generation remains deterministic because the generator consumes inspectable JSON artifacts, not model output at row-generation time.
| Advisor | Status | Network | Notes |
|---|---|---|---|
| none | default | none | No API key, no model call. |
| Anthropic | optional | online | Requires advisor extra and API key. |
| Ollama | optional | local | Supports offline local model use. |
| OpenAI | stub/planned | online | Reserved interface; not listed as active advisor support. |
| llama.cpp | stub/planned | local | Reserved interface; not listed as active advisor support. |
Relational and lakehouse workflows
Great Generator supports parent-child tables, primary keys and foreign keys, fact and dimension examples, CDC simulation, anomaly injection, SCD2 history, dimensional models, Data Vault-style examples, and Spark/Delta output.
Returned DataFrames stay in your control, so you can write to files, catalogs, databases, or cloud storage through native Pandas and Spark APIs.
data = generate_relational(tables=tables, seed=42)
customers = data["customers"]
orders = data["orders"]
data = generate_domain("banking", history="scd2")
cdc = generate_cdc("banking", table="customers", rows=1000)
Spark, Delta, and cloud paths
Generate Pandas or Spark DataFrames and write through normal runtime APIs. Pandas can write local CSV, JSON, and Parquet. Spark can write to DBFS, ADLS, S3, GCS, HDFS, mounted paths, Parquet, Delta, and configured database connectors.
df.to_parquet("customers.parquet", index=False)
spark_df.write.mode("overwrite").parquet("s3://bucket/demo/customers")
spark_df.write.format("delta").mode("overwrite").save("dbfs:/tmp/demo_delta")
Optional MCP server
Install `great-generator[mcp]` to expose selected Great Generator tools over local stdio MCP. The server wraps existing public APIs, writes generated datasets to local files, and returns summaries, previews, file paths, warnings, and manifest information.
The MCP server does not introduce a new generation engine, does not call external APIs by default, does not send data to production systems, and does not overwrite files unless `overwrite=True`.
pip install "great-generator[mcp]"
great-generator-mcp
{
"mcpServers": {
"great-generator": {
"command": "great-generator-mcp",
"args": []
}
}
}
Trust, safety, and determinism
Great Generator separates design-time advice from row generation. Advisor outputs are saved as JSON artifacts. The generator consumes those artifacts deterministically. This keeps test data repeatable and makes plan review possible before data is generated.
Same schema, plan, seed, and arguments should produce the same output for repeatable tests and demos.
`advisor="none"` is the default. It does not call a model, read API keys, or require network access.
Plans, tags, reports, and manifests can be reviewed, edited, saved, and committed with your project.
The library creates synthetic data. It does not anonymize, mask, de-identify, or transform production records.
Documentation
Release highlights
| Version | Focus | Highlights |
|---|---|---|
| 0.1.8 | Schema ingestion, optional MCP, SEO, org links, and architecture | JSON Schema, dbt metadata, CSV/YAML/JSON data dictionaries, query-aware examples, `great-generator[mcp]`, local-file tools, safety controls, tests, sitemap, robots.txt, SEO metadata, GreatDataLabs links, and architecture diagram. |
| 0.1.7 | SQL DDL ingestion and query-aware generation | `parse_ddl(...)`, canonical contracts, parser diagnostics, documented ANSI/Spark/Databricks subset, required values, partitions, selectivity, and join coverage. |
| 0.1.6 | AI advisor planning layer | Advisors, `GenerationPlan`, `ColumnTags`, cached advisor calls, manifest metadata, and `plan=` support. |
| 0.1.5 | Schema-first docs and Spark writes | Schema input matrix, Databricks examples, Snowflake writes, Azure SQL writes, and documentation site updates. |
| 0.1.1 | Advanced APIs | Anomaly labels, SCD2 history, recipes, CLI, dimensional models, and Data Vault models. |
| 0.1.0 | Initial release | Domain packs, Pandas/Spark engines, exports, CDC, anomalies, schema generation, and relational generation. |
Roadmap