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

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值