嗨@Ambrose沃克,
這是文檔的鏈接https://docs.m.eheci.com/spark/latest/spark-sql/language-manual/sql-ref-syntax-ddl-create-table-d..。
這裏的語法:
創建表(如果不存在]table_identifier
[(col_name1 col_type1 [評論col_comment1],…)]
使用data_source
(選項(key1 [=] val1, key2 = val2,…)]
(分區通過(col_name2 col_name1…)]
(集群通過(col_name4 col_name3…)
(排序通過(col_name [ASC|DESC),…)]
成num_buckets桶)
(位置路徑)
(評論table_comment]
[TBLPROPERTIES key1 [=] val1 key2 = val2,…)]
(作為select_statement]