Snowpark Migration Accelerator: 使用¶
描述¶
Spark 中的 USING 命令指定创建表时应使用了哪种文件格式。常见格式包括 CSV、JSON 和 AVRO。有关 Create Table USING 命令的更多详细信息,请参阅 Databricks 文档 (https://docs.databricks.com/en/archive/spark-sql-2.x-language-manual/create-table.html)。
语法¶
CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
[(col_name1 col_type1 [COMMENT col_comment1], ...)]
USING data_source
[OPTIONS (key1 [ = ] val1, key2 [ = ] val2, ...)]
[PARTITIONED BY (col_name1, col_name2, ...)]
[CLUSTERED BY (col_name3, col_name4, ...) INTO num_buckets BUCKETS]
[LOCATION path]
[COMMENT table_comment]
[TBLPROPERTIES (key1 [ = ] val1, key2 [ = ] val2, ...)]
[AS select_statement]
示例源模式¶
The USING data source statement is not supported in Snowflake. During migration, this statement will be commented out and marked with an Error, Warning, and Issue (EWI) message indicating that it is unsupported.
示例数据¶
CREATE TABLE table1
(
id INTEGER
) USING DELTA;
CREATE TABLE table1
(
id INTEGER
) /*** MSC-WARNING - MSCEWI# - SNOWFLAKE DOES NOT SUPPORT USING STATEMENT ***/
-- USING DELTA;
已知问题¶
Snowflake 不支持 SQL 语句中的 USING 数据源子句。