Cannot load text file using PigStorage()

Hi,

I’m trying to load my sample text file in which fields are separated by ‘,’ in Pig using PigStorage(’,’) but receiving the below error:

Error:

2017-06-22 00:31:02,219 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve pigstorage using imports: [, java.lang.
, org.apache.pig.builtin., org.apache.pig.impl.builtin.]
Details at logfile: /home/deepikanandyala9361/pig_1498089547474.log

Here is the command I used:

sample2 = load ‘/…/…/xyz.txt’ using pigstorage(’,’) as (showname:chararray,channelname:chararray);

Hi Deepika,

I uploaded this file into my HDFS home directory and was able to run the following sequence of commands successfully:

A = load 'join2_genchanA.txt' using PigStorage(',') as (showname:chararray,channelname:chararray);
dump A;

Hope this helps

Hi Abhinav,

Thank you for responding. It worked fine now.

Hi Abhinav,

When I am trying to use the same command, it says that the job run successfully but not sure where the resultset is getting displayed. Can you please help to see the resultset?

I am seeing the new version of PIG on the labs…

Whenever I run a query, the job tracker shows it is successfull and just under query editor it shows JOB was Killed as a message… Can someone help in this?

I am getting an error as below when importing the file using PIGSTORAGE(’|’) command…

Message: java.net.ConnectException: Connection refused (Connection refused)
2018-08-21 07:04:29,514 [main] ERROR org.apache.pig.PigServer - exception during parsing: Error during parsing. Could not resolve PIGSTORAGE using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.]
Failed to parse: Pig script failed to parse:
<file pig-7525.pig, line 6, column 60> pig script failed to validate: org.apache.pig.backend.executionengine.ExecException: ERROR 1070: Could not resolve PIGSTORAGE using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.]