Releases: xnuinside/simple-ddl-parser
Added Athena as output mode, refactoring & better support for '\\' strings
IMPORTANT:
In this versions there is some output changes & fixes that can break your code.
-
Now all arguments inside brackets are parsed as separate strings in the list.
For example:
file_format = (TYPE=JSON NULL_IF=('field')
this was parsed like 'NULL_IF': "('field')",
now it will be: 'NULL_IF': ["'field'"], -
Added separate tokens for EQ
=
and IN (previously they was parsed as IDs also - for internal info, for contributors. -
Some check statements in columns now parsed validly, also IN statements parsed as normal lists.
So this statement include_exclude_ind CHAR(1) NOT NULL CONSTRAINT chk_metalistcombo_logicalopr
CHECK (include_exclude_ind IN ('I', 'E')),
will produce this output:
{'check': {'constraint_name': 'chk_metalistcombo_logicalopr',
'statement': {'in_statement': {'in': ["'I'", "'E'"],
'name': 'include_exclude_ind'}}},
Fixes
- DEFAULT word now is not arriving in key 'default' (it was before in some cases)
New Features
- Added Athena output mode and initial support - #272
1.5.0 fix uniques in case of indexes / unique case for several columns
v1.4.0 ⭕ Oracle new output keywords - is_global & temp
Fixes
🔍 BigQuery:
- Indexes without schema causes issues in BigQuery dialect - fixed.
Improvements
⭕ Oracle:
- Added new output keywords in table definition -
temp
&is_global
. Added support for create global temporary table - #182
1.3.0 🐘 PostgreSQL WITH TIME ZONE & 🔍 BigQuery PARTITION BY Improvements
Fixes
🐘 PostgreSQL:
- Timezone was moved out from type definition to keyword 'with_time_zone' it can be True (if with time zone) or False (if without)
🔍 BigQuery:
- Previously Range in RANGE_BUCKETS was parsed as a columns, now this behaviour is changed and
range placed in own keyword - 'range' (can be array or str).
Also for all ``*_TRUNC PARTITIONS` like DATETIME_TRUNC, TIMESTAMP_TRUNC, etc, second argument moved to arg 'trunc_by'
Improvements
🐘 PostgreSQL:
- Added support for PostgreSQL with / without time zone - #250
🔍 BigQuery:
- Added support for GENERATE_ARRAY in RANGE_BUCKETS #183
1.2.1 MySQL 🐬 & ⭕ Oracle & 🐘 PostgreSQL updates
Fixes
🐬 MySQL:
- Fixed issue relative to auto_increment that caused empty output if auto_increment defined in table properties -
#206
Improvements
🐬 MySQL:
- auto_increment added as property to mysql output
⭕ Oracle:
- Added support for constraint name in column definition - #203
- Added support for GENERATED (ALWAYS | (BY DEFAULT [ON NULL])) AS IDENTITY in column definition
🐘 PostgreSQL:
- Added support for CAST statement in column GENERATE ALWAYS expression - #198
v1.1.0: 🐬 & ❄ Improvements
1.0.4 Few Fixes & New statements release
v1.0.3 Fixed bug with `CREATE OR REPLACE SCHEMA` & some more
v1.0.3
Improvements
- Fixed bug with
CREATE OR REPLACE SCHEMA
. - Added support of create empty tables without columns CREATE TABLE tablename (); (valid syntax in SQL)
Snowflake
- Fixed bug with snowflake
stage_
fileformat option value equal a single string asFIELD_OPTIONALLY_ENCLOSED_BY = '\"'
,FIELD_DELIMITER = '|'
- improve snowflake fileformat key equals value into dict. type.
v1.0.2 Snowflake, MySQL, and other small improvements release
Improvements
- Fixed bug with places first table property value in 'authorization' key. Now it is used real property name.
- Fixed typo on Databricks dialect
- improved equals symbols support within COMMENT statement.
- turn regexp into functions
MySQL Improvements
- UNSIGNED property after int parsed validly now
Snowflake
- Snowflake TAG now available on SCHEMA definitions.
v1.0.1 `normalize_names=True` improvements
v1.0.1
Minor Fixes
- When using
normalize_names=True
do not remove[]
from types likedecimal(21)[]
. - When using
normalize_names=True
ensure that"complex"."type"
style names convert tocomplex.type
.