-- Get piggybank.jar that is compatible with your pig version and register
it in your pig script by pointing to the location of the jar file
REGISTER piggybank.jar
A = LOAD 'test.txt' USING org.apache.pig.piggybank.storage.CSVLoader(',') AS (f1:int,f2:chararray,f3:chararray);
B = FOREACH A GENERATE f1, f2, f3;
DUMP B;
1条答案
按热度按时间bihw5rsg1#
您可以编写自己的自定义udf或使用piggybank.jar中的csvloader