08-11-2015 03:25 AM
Hey i need to copy all files from a local directory to the HDFS using pig.
In the pig script im using the copyFromLocal command with a wildcard in the sourcepath i.e copyFromLocal /home/hive/Sample/* /user
It says the source path doesnt exist.
When i use copyFromLocal /home/hive/Sample/ /user , it makes another directory in the HDFS by the name of 'Sample', which i dont need.
But when i include the file name i.e /home/hive/Sample/sample_1.txt it works.
I dont need a single file. I need to copy all the files in the directory without making a directory in the HDFS.
08-24-2015 11:36 PM