Created 06-15-2016 11:52 AM
Created 06-15-2016 12:31 PM
Can you please check the home directory of the user who is running the pig script?
Usually, we will have a pig log like /root/pig_1465986765983.log.
Thanks and Regards,
Sindhu
Created 06-15-2016 12:46 PM
Hi Sindhu, Yes, the directory is right. The files are inserted into: user -> cloudera -> Analytics (folder created) -> source (folder created) Do you think the script do what I want?
Created 06-27-2016 03:25 AM
PigStorage has a column INPUT_FILE_NAME, which indicates the input file name of that input by specifying -tagFile
i/p:
1,a
2,b
3,c
o/p:
pigtest.txt,1,a
pigtest.txt,2,b
pigtest.txt,3,d
A = load '/pigtest/pigtest.txt' using PigStorage(',', '-tagFile'); /* The first column of the output will be INPUT_FILE_NAME */
B = FOREACH A GENERATE $0,$1,$2;
DUMP B;
Please let me know if it is helpful.
Regards,
Ravi.