输入文件:
[Tom,123,0,jump] [jerry,345,1,run]
我想在hive中读取上面的输入,我的ddl是如果不存在,则创建外部表db1.tomjerry(name string,id int,isgood int,activity string)以','结尾的行格式分隔字段位置'/user/myname/sample.txt'当我尝试阅读时,从db1.tomjerry中选择name我明白了,[汤姆][杰瑞]如何卸下配置单元输出中的方括号。?
hfyxw5xn1#
添加由“[”转义的ie公司
CREATE EXTERNAL TABLE IF NOT EXISTS db1.tomjerrry ( name ARRAY<string>, id int, isGood int, activity string ) row format delimited fields terminated by ',' ESCAPED BY '['; LOCATION '/user/myname/sample.txt'
或更新csv文件删除[。
1条答案
按热度按时间hfyxw5xn1#
添加由“[”转义的
ie公司
或更新csv文件删除[。