标签:
hive编程指南中有个employees表,默认的分隔符比较繁杂,编辑起来不太方便(普通编辑器编辑的控制字符^A等被当成字符串处理了,没有起到分隔符的作用)。收集的解决方案如下:
http://www.myexception.cn/software-architecture-design/1351552.html
http://blog.csdn.net/lichangzai/article/details/18703971
切记,简单的文本编辑器编辑如下的内容,分隔符是没被识别的,^A^B^C都会被当成字符串处理,在hive中导入数据会识别不出分隔符,导致一些字段显示null
John Doe^A100000.0^AMary Smith^BTodd Jones^AFederal Taxes^C.2^BStateTaxes^C.05^BInsurance^C.1^A1 Michigan Ave.^BChicago^BIL^B60600
Mary Smith^A80000.0^ABill King^AFederal Taxes^C.2^BState Taxes^C.05^BInsurance^C.1^A100 Ontario St.^BChicago^BIL^B60601
Todd Jones^A70000.0^AFederalTaxes^C.15^BState Taxes^C.03^BInsurance^C.1^A200 Chicago Ave.^BOak Park^BIL^B60700
Bill King^A60000.0^AFederal Taxes^C.15^BState Taxes^C.03^BInsurance^C.1^A300 Obscure Dr.^BObscuria^BIL^B60100
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:
原文地址:http://blog.csdn.net/hellozpc/article/details/46792143