MapReduce服务 MRS-CREATE TABLE:语法

时间:2023-11-01 16:25:29

语法

CREATE [EXTERNAL]①,② TABLE [IF NOT EXISTS] [catalog_name.][db_name.]table_name (

{ [col_name data_type [COMMENT col_comment] [ WITH ( property_name = expression [, ...] ) ]

| LIKE existing_table_name [ {INCLUDING | EXCLUDING} PROPERTIES] } [, ...])

[[PARTITIONED BY(col_name data_type, ....)] [SORT BY ([column [, column ...]])] ]

[COMMENT 'table_comment']

[ WITH ( property_name = expression [, ...] ) ]

[[PARTITIONED BY (col_name data_type, .....)] [CLUSTERED BY (col_name, col_name, ...) [SORTED BY (col_name, col_name, ...)] INTO num_buckets BUCKETS] ]

[

[ROW FORMAT row_format]

[STORED AS file_format]

[LOCATION 'hdfs_path']

[TBLPROPERTIES (orc_table_property = value [, ...] ) ] ]①,②

support.huaweicloud.com/cmpntguide-lts-mrs/mrs_01_249019.html