File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -482,9 +482,9 @@ def _parse_table_parts(
482482 )
483483
484484 table_arg = table .this
485- name = table_arg .name
485+ name = table_arg .name if isinstance ( table_arg , exp . Var ) else ""
486486
487- if isinstance ( table_arg , exp . Var ) and name .startswith (SQLMESH_MACRO_PREFIX ):
487+ if name .startswith (SQLMESH_MACRO_PREFIX ):
488488 # In these cases, we don't want to produce a `StagedFilePath` node:
489489 #
490490 # - @'...' needs to parsed as a string template
Original file line number Diff line number Diff line change @@ -699,3 +699,7 @@ def test_model_name_cannot_be_string():
699699 )
700700
701701 assert "\\ 'name\\ ' property cannot be a string value" in str (parse_error )
702+
703+
704+ def test_parse_snowflake_create_schema_ddl ():
705+ assert parse_one ("CREATE SCHEMA d.s" , dialect = "snowflake" ).sql () == "CREATE SCHEMA d.s"
You can’t perform that action at this time.
0 commit comments