1.最基础啥都不带的建表
create table if not exists user_test(
id string COMMENT 'ID',
name string COMMENT '名字',
age string COMMENT '年龄'
)
2.添加分隔符,以逗号","分割
create table if not exists user_test(
id string COMMENT 'ID',
name string COMMENT '名字',
age string COMMENT '年龄'
)row format delimited fields terminated by ','
3.创建分区表
- 创建单一分区
create table if not exists user_test(
id string COMMENT 'ID',
name string COMMENT '名字',
age string COMMENT '年龄'
)
PARTITIONED BY(
day string COMMENT 'day=yyyy-MM-dd')
row format delimited fields terminated by ','
- 创建多分区
create table if not exists