skillfed

ddlparse

DDL parase and Convert to BigQuery JSON schema

ddlparse v1.10.0 86.0K downloads/30d#13,891 on PyPI87
Permissive license BSD-3-Clause DORMANT released

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 ddlparse

uv

uv add ddlparse

poetry

poetry add ddlparse

Installing 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

Development Status :: 5 - Production/StableLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: DatabaseTopic :: Software Development :: Libraries :: Python Modules

Tags

ddl parser sqlbigquery schema conversioncreate table parsersql schema extractiondatabase ddl to bigquerymysql postgresql oracle ddl parse
schema-migrationbigquerysql-parsing

More Python Modules packages