-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
Hi,
there is CREATE TABLE statement in Snowflake, created by Matillion where the cluster by
property precedes the table column definition, I have no idea where to start the change.
here the acceptance test :
def test_table_inverse_clusterby_and_column_def():
ddl = """CREATE TABLE ${database_name}.MySchemaName."MyTableName" cluster by ("DocProv") (ID NUMBER(38,0) NOT NULL, "DocProv" VARCHAR(2));"""
result = DDLParser(ddl, normalize_names=True, debug=True).run(output_mode="snowflake")
expected = [{'table_name': 'MyTableName',
'schema': 'MySchemaName',
'primary_key': [],
'columns': [{
'name': 'ID',
'size' : (38,0),
'type': 'NUMBER',
'references': None,
'unique': False,
'nullable': False,
'default': None,
'check': None,
},
{
'name': 'DocProv',
'size' : 2,
'type': 'VARCHAR',
'references': None,
'unique': False,
'nullable': True,
'default': None,
'check': None,
}],
'alter': {},
'checks': [],
'index': [],
'partitioned_by': [],
'cluster_by' : ['DocProv'],
'tablespace': None,
'external' : False,
'primary_key_enforced' : None,
'table_properties': {'project': '${database_name}'},
'clone' : None
}]
assert result == expected
Metadata
Metadata
Assignees
Labels
No labels