ddlparse
DDL parase and Convert to BigQuery JSON schema
What it is and what it does
ddlparse is a Python library that reads CREATE TABLE statements written in MySQL, MariaDB, PostgreSQL, Oracle, or Redshift SQL dialects and extracts the schema structure into a programmatic object model. It then converts that schema to BigQuery-compatible JSON schema format or generates equivalent BigQuery CREATE TABLE DDL statements. The package depends only on pyparsing and installs as a pure Python wheel.
You use it when you need to migrate table definitions from one of those source databases to BigQuery, or when you need to programmatically inspect and transform table structure from raw DDL. It exposes column-level metadata (data types, constraints, precision, scale, nullability, keys, defaults, comments) and supports case normalization of identifiers during conversion.
Use it for:
- Migrate table schemas from MySQL or PostgreSQL to BigQuery by parsing existing DDL and generating BigQuery-compatible schema.
- Extract column metadata (types, constraints, nullability) from Oracle or Redshift CREATE TABLE statements for documentation or validation.
- Programmatically transform DDL identifiers to uppercase or lowercase during schema conversion pipelines.
- Generate BigQuery JSON schema files from legacy database DDL without manual rewriting.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses CREATE TABLE DDL statements from MySQL, MariaDB, PostgreSQL, Oracle, and Redshift, extracting table schema information and converting it to BigQuery JSON schema and DDL formats.
Yes, if you need to parse and convert CREATE TABLE DDL from MySQL, PostgreSQL, Oracle, or Redshift to BigQuery format. The package is stable, has no known vulnerabilities, and installs cleanly. However, maintenance is dormant (last release July 2021); if you need support for newer SQL features or active bug fixes, verify that the package handles your specific dialect variations before committing to it.
Install
ddlparse on PyPI
pip
pip install ddlparseuv
uv add ddlparsepoetry
poetry add ddlparseInstalling ddlparse
Before you install
Low friction: pure Python wheel with a single runtime dependency (pyparsing). Maintenance is dormant—last release was 2021-07-09 and last commit 2023-10-23—but the package is marked Production/Stable and has seen no security issues.
License in practice
BSD-3-Clause is permissive; you may use, modify, and distribute this package freely in commercial and private projects provided you include the license text and a notice of changes.
Quickstart
from ddlparse import DdlParse
sample_ddl = "CREATE TABLE My_Schema.Sample_Table (Id integer PRIMARY KEY, Name varchar(100) NOT NULL);"
table = DdlParse().parse(sample_ddl)
print(table.to_bigquery_fields())
Requires Python >= 3.5; only CREATE TABLE statements are supported, not other DDL operations.
Verify before relying
- Whether the parser handles all MySQL, PostgreSQL, Oracle, and Redshift dialect variations equally well, or if some databases have better coverage than others.
- Performance characteristics on large or complex DDL statements.
- Whether dormant status (last release 2021-07-09) means the package is stable enough for production or if it lacks support for newer SQL features.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pyparsing |
| Maintenance | dormant — 1,862 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 85,974/month — #13,891 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ddlparse-1.10.0-py3-none-any.whl
Keywords: ddl, sql, parse, bigquery
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
bigquery-schema-generatorGenerates BigQuery table schemas from complete…
permissive · top 15,000 on PyPI
pydbmlPyDBML parses and generates DBML (Database…
permissive · top 15,000 on PyPI
simple-ddl-parserParses SQL DDL statements and their dialect…
permissive · top 15,000 on PyPI
mo-sql-parsingParses SQL queries into JSON-serializable parse…
copyleft · top 15,000 on PyPI
py-partiql-parserParses and executes PartiQL queries against…
permissive · top 5,000 on PyPI
pydynamodbPyDynamoDB is a DB API 2.0 client for Amazon…
permissive · top 15,000 on PyPI
pangresUpserts pandas DataFrames into PostgreSQL,…
permissive · top 15,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
sqlalchemy-jdbcapiSQLAlchemy dialect for JDBC and ODBC database…
permissive · top 15,000 on PyPI
SQLAlchemy-JSONFieldProvides a SQLAlchemy column type for storing…
permissive · top 5,000 on PyPI