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.
Within HQL the following is a valid create table statement:
CREATE TABLE a.b (
`c` array<string>
)
But parsing this with DDLParser emits:
simple_ddl_parser.ddl_parser.DDLParserError: Unknown statement at LexToken(RT,'array<string>',1,23)
Poking through the existing tests and closed issues I see a specific form of array<struct<cola:string,colb:string>> is supported, but it doesn't seem like the generic handling of arrays is working. The hive docs aren't particularly clear, but they show that all data types are valid within the <>, and elsewhere on the page gives a specific example using array<string>.
Within HQL the following is a valid create table statement:
But parsing this with DDLParser emits:
Poking through the existing tests and closed issues I see a specific form of
array<struct<cola:string,colb:string>>
is supported, but it doesn't seem like the generic handling of arrays is working. The hive docs aren't particularly clear, but they show that all data types are valid within the <>, and elsewhere on the page gives a specific example usingarray<string>
.