Snowflake 架构名称中的特殊字符

Special character in Schema name in Snowflake

我不小心在 snowflake 中创建了一个模式 {"target_db.target_schema"}。当我尝试使用删除此架构时 drop schema "{"target_db.target_schema"}":

我收到错误消息,

SQL compilation error: syntax error line 1 at position 15 unexpected 'target_db'. Is there any way to drop the schema.

你可以双引号:

drop schema "{""target_db.target_schema""}";

在这种情况下,Snowsight UI 很有用:

在省略号下有一个选项“Place name in SQL”:

哪个 returns 正确引用了名称:TEST."{""target_db.target_schema""}"