Created on 11-10-201504:56 AM - edited 08-17-201901:55 PM
SYMPTOM: Attempting to submit a Pig job via WebHCat that defines parameter(s) for substitution as command-line arguments results in an "incorrect usage" message and job does not run. Doing the same through Hue results in an "undefined parameter" message and job does not run.
ROOT CAUSE: If the parameter is passed to curl as a single argument (-d 'arg=-param paramName=paramValue') it is interpreted incorrectly by Pig. Submitting the parameter via Hue as a single argument has the same unwanted effect.
To achieve the same using Hue, pass two arguments in sequence (refer to attached image for an example).
RESOLUTION: WebHCat works as designed. This issue is a limitation of curl. The Hue workaround is good for a single parameter, however multiple parameters may not work.
Any idea how we can pass multiple parameters to the curl command? eg: I would want to specify an input as well as output file as a parameter to my query.pig file
Also, I have a jar that I register within my pig script. How to use that with curl command? eg
register "/home/test/my.jar"
A = load '$input/pig' using pigstorage()
Store A into '$output'
------------------------------------
Above I am trying to pass 2 parameters: input and output as well as trying to register a jar that is there on my local. Any idea how to go about it? Again, I am trying to run the above script via curl