Pig Store the file with custom row/record delimiter

可紊 提交于 2019-12-24 17:23:03

问题


I Have a file with a ctrlB as a record delimiter. I was able to read the file in pig by over-writing LoaderInputFormat class and getInputFormat() method in pig storage. But I was not able to store the file with ctrlB as a record delimiter.


回答1:


Read ctrl+b delimited record

SET textinputformat.record.delimiter '\n'
x= LOAD 'xyz' USING PigStorage('\u0002');

Write ctrl+b delimited record-

store x into 'y' using PigStorage('\u0002');


来源:https://stackoverflow.com/questions/38776692/pig-store-the-file-with-custom-row-record-delimiter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!