simple-ddl-parser
Simple DDL Parser to parse SQL & dialects like HQL, TSQL (MSSQL), Oracle, AWS Redshift, Snowflake, MySQL, PostgreSQL, etc ddl files to json/python dict with full information about columns: types, defaults, primary keys, etc.; sequences, alters, custom types & other entities from ddl.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, installs with minimal friction, and is widely used. It solves a real problem—parsing diverse SQL dialects into structured data—with a permissive MIT license. Install it if you need to programmatically extract or transform SQL schema definitions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later; ply must be installed as a runtime dependency.
- Low friction installation with a single runtime dependency (ply).
- Actively maintained with recent commits and a stable release cadence; maintainer explicitly guarantees backward compatibility in patch and minor versions.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal obligations.
last release 2026-03-28 (139 days) · last repo commit 2026-07-27 · 222 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 264,743 downloads/mo, #8,333 on PyPI
Alternatives
Verify before relying
from simple_ddl_parser import DDLParser
ddl = "CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(2000))"
result = DDLParser(ddl).run()
print(result)- Extent of support for edge cases and less common SQL dialects beyond the documented list.
- Performance characteristics when parsing very large or complex DDL files.
- Accuracy of output structure consistency across all supported dialects and output modes.
What it is and what it does
Simple DDL Parser is a Python library built on ply (Python's lex and yacc implementation) that converts SQL Data Definition Language statements into structured dictionaries or JSON. It supports multiple SQL dialects including HQL, MSSQL, Oracle, MySQL, PostgreSQL, BigQuery, Redshift, Snowflake, SparkSQL, IBM DB2, and others. The parser extracts detailed schema information—table names, column definitions with types and sizes, primary keys, constraints, defaults, and references—while preserving dialect-specific properties like partitioning and storage formats when requested.
The library is case-insensitive and designed to handle real-world DDL variations. It offers both a Python API for programmatic use and a command-line tool (sdp) for batch processing. Output can be customized via output_mode to include dialect-specific fields or reshaped into formats like BigQuery JSON schema. The maintainer actively adds support for new statements and dialects based on user requests and maintains functional test coverage.
Use it for
- Extract table and column metadata from existing SQL databases to generate documentation or ERD diagrams.
- Convert DDL from one SQL dialect to another by parsing and reshaping output with custom schemas.
- Validate and normalize DDL statements programmatically in data pipeline or schema migration tools.
- Parse Hive or BigQuery DDL to extract partition, storage, and location metadata for data lake management.
- Generate Python ORM models or database client code from DDL definitions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, installs with minimal friction, and is widely used. It solves a real problem—parsing diverse SQL dialects into structured data—with a permissive MIT license. Install it if you need to programmatically extract or transform SQL schema definitions.
Install
simple-ddl-parser on PyPI
Before you install
Low friction installation with a single runtime dependency (ply). Actively maintained with recent commits and a stable release cadence; maintainer explicitly guarantees backward compatibility in patch and minor versions.
Requires Python 3.9 or later; ply must be installed as a runtime dependency.
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal obligations.
Quickstart
from simple_ddl_parser import DDLParser
ddl = "CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(2000))"
result = DDLParser(ddl).run()
print(result)
Verify before relying
- Extent of support for edge cases and less common SQL dialects beyond the documented list.
- Performance characteristics when parsing very large or complex DDL files.
- Accuracy of output structure consistency across all supported dialects and output modes.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageply |
| Maintenance | Actively maintained 139 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 264,743 / month, #8,333 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: PL/SQLProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: SQLTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities |
Evidence: simple_ddl_parser-1.13.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “SQL DDL parser”
- simple-ddl-parserParses SQL DDL statements and their dialect variants into structured…
- ddlparseParses CREATE TABLE DDL statements from MySQL, MariaDB, PostgreSQL,…
- pydbmlPyDBML parses and generates DBML (Database Markup Language) schemas,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also ddlparse · mo-sql-parsing · pydbml · sqlglot · sqlglotrs · acryl-sqlglot · collate-sqlfluff · sqlglotc · sqllineage · sqlparse