Reply
Explorer
Posts: 21
Registered: ‎08-23-2018

How can I pass HQL parameter in Oozie workflow using Hue?

http://gethue.com/drag-drop-saved-hive-queries-into-your-workflows/#comment-78368

Did it not working at currrent version? ex, Hue4.3 etc..

Parameter Name is 'zip' when submit workflow. It's not 'zip_code'
Input From. this like.

I expected to look like this image.

 

스크린샷 2019-03-23 오전 12.14.18.png

 

But, It didn't working.

 

 

스크린샷 2019-03-22 오후 11.52.41.png

 

 

 


Please. Could you check my demo workflow.
http://demo.gethue.com/hue/oozie/editor/workflow/edit/?workflow=292135

I 'am use cloudera cdh 6.1.0.

 

 

Cloudera Employee
Posts: 761
Registered: ‎03-23-2015

Re: How can I pass HQL parameter in Oozie workflow using Hue?

Hi,

I have tested, it seems like if you make the variable in HQL and the variable in the parameters section to be the same name, it will work.

So update the parameter to be "zip=${zip}", rather than "zip={$zip_code}", then Hue will ask for the value of zip, and it will pass along the value correctly.

Cheers
Highlighted
Explorer
Posts: 21
Registered: ‎08-23-2018

Re: How can I pass HQL parameter in Oozie workflow using Hue?

[ Edited ]

 

Thank you for testing.


Have you ever submitted a workflow?

Workflow still dosen't work.

 

Look at this.

 

first) saved HQL document.It contained test parameter '76710'.

http://demo.gethue.com/hue/editor?editor=292133

oozie-hql.PNGhql docuement

 

second) click the "submit" button. 

I setted '92801' value of parameter. and passed it.

 

oozie-param.PNGparam

 

But HQL results' zipcode is '76710'. 

The results' will be empty, If I save the HQL document no parameter value.

I have tested many case. 

I think that problem is HQL because It haven't variable. please look at this capture.

This capture is oozie log.

hql.PNGhql

Oozie runed hql query no have variable "$zip".

 

It is very necessary function for me. Please help me to find the soluction.