Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
avatar

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.

WORKAROUND: Pass the parameter as two arguments:

curl -d file=myScript.pig -d 'arg=-param' -d 'arg=paramName=paramValue' 'http://<server>:50111/templeton/v1/pig'

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.

428-parameter-substitution-with-hue.png

3,045 Views
Comments
avatar
New Member

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

Thank you

Version history
Last update:
‎04-21-2026 06:56 AM
Updated by: