1.分区表怎么建立?
Create [EXTERNAL] TABLE [IF NOT EXISTS] table_name [(col_name data_type [COMMENT col_comment], ...)] [COMMENT table_comment] [PARTITIONED BY (col_name data_type [COMMENT col_comment], ...)] [CLUSTERED BY (col_name, col_name, ...) [SORTED BY (col_name [ASC|DESC], ...)] INTO num_buckets BUCKETS] [ROW FORMAT row_format] [STORED AS file_format] [LOCATION hdfs_path]
create table partition_test
(member_id string,
name string
)
COMMENT "partition_test"
partitioned by (stat_date string)
row format delimited fields terminated by ',';
2.hive 表有主键设定吗?