Simple Ddl Parser Versions Save

Simple DDL Parser to parse SQL (HQL, TSQL, AWS Redshift, BigQuery, Snowflake and other dialects) ddl files to json/python dict with full information about columns: types, defaults, primary keys, etc. & table properties, types, domains, etc.

v1.1.0

2 weeks ago

Improvements

🐬 MySQL:

  1. Added support for INDEX statement inside table definition
  2. Added support for MySQL INVISIBLE/VISIBLE statement - https://github.com/xnuinside/simple-ddl-parser/issues/243

❄ Snowflake:

  1. Added support for cluster by statement before columns definition - https://github.com/xnuinside/simple-ddl-parser/issues/234

v1.0.4

1 month ago

🐈

Improvements

  1. Support functions with schema prefix in DEFAULT and CHECK statements. https://github.com/xnuinside/simple-ddl-parser/issues/240

Fixes

  1. Fix for REFERENCES NOT NULL - https://github.com/xnuinside/simple-ddl-parser/issues/239
  2. Fix for snowflake stage name location format bug fix - https://github.com/xnuinside/simple-ddl-parser/pull/241

v1.0.3

3 months ago

v1.0.3

Improvements

  1. Fixed bug with CREATE OR REPLACE SCHEMA.
  2. Added support of create empty tables without columns CREATE TABLE tablename (); (valid syntax in SQL)

Snowflake

  1. Fixed bug with snowflake stage_ fileformat option value equal a single string as FIELD_OPTIONALLY_ENCLOSED_BY = '\"', FIELD_DELIMITER = '|'
  2. improve snowflake fileformat key equals value into dict. type.

v1.0.2

3 months ago

Improvements

  1. Fixed bug with places first table property value in 'authorization' key. Now it is used real property name.
  2. Fixed typo on Databricks dialect
  3. improved equals symbols support within COMMENT statement.
  4. turn regexp into functions

MySQL Improvements

  1. UNSIGNED property after int parsed validly now

Snowflake

  1. Snowflake TAG now available on SCHEMA definitions.

v1.0.1

3 months ago

v1.0.1

Minor Fixes

  1. When using normalize_names=True do not remove [] from types like decimal(21)[].
  2. When using normalize_names=True ensure that "complex"."type" style names convert to complex.type.

v1.0.0

4 months ago

v1.0.0 In output structure was done important changes that can in theory breaks code.

Important changes

  1. Important change:

all custom table properties that are defined after column definition in 'CREATE TABLE' statement and relative to only one dialect (only for SparkSQL, or HQL,etc), for example, like here: https://github.com/xnuinside/simple-ddl-parser/blob/main/tests/dialects/test_snowflake.py#L767 or https://github.com/xnuinside/simple-ddl-parser/blob/main/tests/dialects/test_spark_sql.py#L133 will be saved now in property table_properties as dict. Previously they was placed on same level of table output as columns, alter, etc. Now, they grouped and moved to key table_properties.

  1. Formatting parser result now represented by 2 classes - Output & TableData, that makes it more strict and readable.

And more.

Full Changelog of version 1.0.0: https://github.com/xnuinside/simple-ddl-parser/blob/main/CHANGELOG.txt#L1

v0.32.0

4 months ago

v0.32.0

Improvements

  1. Added support for several ALTER statements (ADD, DROP, RENAME, etc) - https://github.com/xnuinside/simple-ddl-parser/issues/215 In 'alter' output added several keys:
    1. 'dropped_columns' - to store information about columns that was in table, but after dropped by alter
    2. 'renamed_columns' - to store information about columns that was renamed
    3. 'modified_columns' - to track alter column changes for defaults, datetype, etc. Argument stores previous columns states.

Fixes

  1. Include source column names in FOREIGN KEY references. Fix for: https://github.com/xnuinside/simple-ddl-parser/issues/196
  2. ALTER statement now will be parsed correctly if names & schemas written differently in create table statement and alter. For example, if in create table you use quotes like "schema_name"."table_name", but in alter was schema_name.table_name - previously it didn't work, but now parser understand that it is the same table.

v0.31.3

4 months ago

v0.31.3

Improvements

Snowflake update:

  1. Added support for Snowflake Virtual Column definition in External Column AS () statement - https://github.com/xnuinside/simple-ddl-parser/issues/218
  2. enforce support for Snowflake _FILE_FORMAT options in External Column ddl statement - https://github.com/xnuinside/simple-ddl-parser/issues/221

Others

  1. Support for KEY statement in CREATE TABLE statements. KEY statements will now create INDEX entries in the DDL parser.

Big-big thanks for contribution goes to https://github.com/dmaresma and https://github.com/cfhowes

v0.31.2

4 months ago

v0.31.2

Improvements

Snowflake update:

  1. Added support for Snowflake AUTOINCREMENT | IDENTITY column definitions with optional parameter ORDER|NOORDER statement - https://github.com/xnuinside/simple-ddl-parser/issues/213

Common

  1. Added param 'encoding' to parse_from_file function - https://github.com/xnuinside/simple-ddl-parser/issues/142. Default encoding is utf-8.

Thanks to https://github.com/dmaresma for contributions.

v0.31.1

6 months ago

Improvements

Snowflake updates:

  1. Support multiple tag definitions in a single WITH TAG statement.
  2. Added support for Snowflake double single quotes - https://github.com/xnuinside/simple-ddl-parser/issues/208