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?
PigStorage has a column INPUT_FILE_NAME, which indicates the input file name of that input by specifying -tagFile
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;
Please let me know if it is helpful.