Skip to content

Plain Dictionary Schema

Ravi Kiran Pagidi edited this page Jun 28, 2026 · 1 revision

Plain Dictionary Schema

Status

Supported. This is the recommended starting point.

What it is

A Python mapping from column name to data type.

When to use it

Use it for notebooks, tests, application fixtures, ETL inputs, and lower environments when you already know the table columns.

Example schema and generation

from great_generator import generate_from_schema

schema = {
    "customer_id": "string",
    "customer_name": "string",
    "age": "int",
    "email": "string",
    "balance": "float",
    "created_at": "datetime",
}

df = generate_from_schema(schema, rows=1000)
print(df.head())

Sample output

customer_id  customer_name  age  email                     balance
CUST000001   Ava Johnson    34   ava.johnson@example.com   4812.37

Values vary between runs unless an optional seed is provided.

Write to CSV or Parquet

df.to_csv("customers.csv", index=False)
df.to_parquet("customers.parquet", index=False)

Notes and limitations

Values must currently be dtype-like values. Inline nested metadata belongs in custom_rules, not inside this mapping.

Clone this wiki locally