-
Notifications
You must be signed in to change notification settings - Fork 4
SQL DDL Schema Examples
Ravi Kiran Pagidi edited this page Jun 28, 2026
·
1 revision
Partially supported. Compact column DDL works. Full CREATE TABLE statements and dialect-specific constraints are planned.
Compact DDL is useful when your schema is already written as column/type pairs or a Spark struct<...> string.
from great_generator import generate_from_schema
ddl = "customer_id string, customer_name string, age int, balance decimal(12,2), created_at timestamp"
df = generate_from_schema(ddl, rows=1000)
print(df.head())
df.to_parquet("customers.parquet", index=False)customer_id customer_name age balance created_at
CUST000001 Ava Johnson 34 4812.37 2024-08-19
CREATE TABLE customers (
customer_id VARCHAR(50),
customer_name VARCHAR(100),
age INT,
balance DECIMAL(12,2),
created_at TIMESTAMP
);The full statement above is not accepted by the current parser. Remove the CREATE TABLE wrapper and constraints, or use a mapping.
Current parsing is dialect-neutral and intentionally compact. It does not inspect SQL Server, Oracle, PostgreSQL, Snowflake, BigQuery, Redshift, or Databricks DDL dialects.