Please help me out... I have spent a lot of hours on this.
I have files in a folder in which i wish them to be loaded according to the order of their file name.
I have even went to the extend of writing Java code to convert the file names to match the format in the guides in the following links.
- Load multiple files in pig
- Pig Latin: Load multiple files from a date range (part of the directory structure)
- http://netezzaadmin.wordpress.com/2013/09/25/passing-parameters-to-pig-scripts/
I am using pig 11.0
In my script.pig,
set io.sort.mb 10;
REGISTER 'path_to/lib/pig/piggybank.jar';
data_ = LOAD '$input' USING org.apache.pig.piggybank.storage.XMLLoader('Data') AS (data_:chararray);
DUMP data_;
In shell
[root@servername currentfolder]# pig -x local script.pig -param input=/20131217/{1..10}.xml
Error returned:
[main] ERROR.org.apache.pig.Main - ERROR 2999: Unexpected error. Undefined parameter : input