Hive programming guide-employees table data definition and programming guide-employees
There is an employees table in the hive programming guide. The default Delimiter is complicated and cannot be edited easily (the control character ^ A edited by the General Editor is treated as A string, does not act as a separator ). The collection solution is as follows:
Http://www.myexception.cn/software-architecture-design/1351552.html
Http://blog.csdn.net/lichangzai/article/details/18703971
Remember, the following content is edited in A simple text editor. The separator is not recognized. ^ A ^ B ^ C will be processed as A string, and the delimiter cannot be recognized when importing data in hive, some fields are displayed as null.
John Doe ^ a4240.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
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.