-
Notifications
You must be signed in to change notification settings - Fork 4
Plain Dictionary Schema
Ravi Kiran Pagidi edited this page Jun 28, 2026
·
1 revision
Supported. This is the recommended starting point.
A Python mapping from column name to data type.
Use it for notebooks, tests, application fixtures, ETL inputs, and lower environments when you already know the table columns.
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())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.
df.to_csv("customers.csv", index=False)
df.to_parquet("customers.parquet", index=False)Values must currently be dtype-like values. Inline nested metadata belongs in custom_rules, not inside this mapping.