我该如何解决多余的逗号或元组中的条目的问题
ab = load "/path/file1.txt" USING PigStorage(',') AS (id1:chararray, id2:chararray, dt:chararray, qty:int);
当前输出:-(F1,S9,12/09/2011,2,,,)
预期输出:-(F1,S9,12/09/2011,2)
我应该对我的file.txt或其他内容中的文本进行更改吗?
在LOAD语句中的单引号('')之间写入路径。
示例:
ab = load '/path/file1.txt' USING PigStorage(',') AS (id1:chararray, id2:chararray, dt:chararray, qty:int);