hive创建表line 2:1character ‘ ’ not supported here

创建表的语句如下,莫名其妙

hive (gmall)> create external table ads_uv_count( 
            >     `dt` string COMMENT '统计日期',
            >     `day_count` bigint COMMENT '当日用户数量',
            >     `wk_count`  bigint COMMENT '当周用户数量',
            >     `mn_count`  bigint COMMENT '当月用户数量',
            >     `is_weekend` string COMMENT 'Y,N是否是周末,用于得到本周最终结果',
            >     `is_monthend` string COMMENT 'Y,N是否是月末,用于得到本月最终结果' 
            > ) COMMENT '活跃设备数'
            > row format delimited fields terminated by '\t'
            > location '/warehouse/gmall/ads/ads_uv_count/'
            > ;
FAILED: ParseException line 2:0 character ' ' not supported here
line 2:1 character ' ' not supported here
line 2:2 character ' ' not supported here
line 3:0 character ' ' not supported here
line 3:1 character ' ' not supported here
line 3:2 character ' ' not supported here
line 4:0 character ' ' not supported here
line 4:1 character ' ' not supported here
line 4:2 character ' ' not supported here
line 5:0 character ' ' not supported here
line 5:1 character ' ' not supported here
line 5:2 character ' ' not supported here
line 6:0 character ' ' not supported here
line 6:1 character ' ' not supported here
line 6:2 character ' ' not supported here
line 6:3 character ' ' not supported here
line 7:0 character ' ' not supported here
line 7:1 character ' ' not supported here
line 7:2 character ' ' not supported here
line 7:3 character ' ' not supported here

把空格删掉后,就好了,关键我建表的表也有前面带制表符的就没事,迷惑

hive (gmall)> create external table ads_uv_count( 
            > `dt` string COMMENT '统计日期',
            > `day_count` bigint COMMENT '当日用户数量',
            > `wk_count`  bigint COMMENT '当周用户数量',
            > `mn_count`  bigint COMMENT '当月用户数量',
            > `is_weekend` string COMMENT 'Y,N是否是周末,用于得到本周最终结果',
            > `is_monthend` string COMMENT 'Y,N是否是月末,用于得到本月最终结果' 
            > ) COMMENT '活跃设备数'
            > row format delimited fields terminated by '\t'
            > location '/warehouse/gmall/ads/ads_uv_count/'
            > ;
OK
Time taken: 0.054 seconds

你可能感兴趣的:(#,hive)