Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does one create optional command line arguments in oozie workflow xml

Please bear in mind that I'm a complete rookie with oozie. I know that one can specify command line arguments in the oozie workflow xml by using the arg tag. I wondered how it is possible to specify an optional command line argument such that oozie will not complain that a required parameter is missing if the user doesn't specify it?

Many thanks in advance. If the information I've given is not specific enough, I can provide a concrete example when I log into my work machine tomorrow. We use apache commons CLI options to parse the options.

E.g. I want to make the following argument optional:

-e${endDateTime}

like image 814
E Shindler Avatar asked Sep 15 '25 02:09

E Shindler


1 Answers

In your workflow wherever you would use ${myparam}, replace it with ${firstNotNull(wf:conf('myparam'), 'mydefaultvalue')}

like image 165
tiho Avatar answered Sep 17 '25 20:09

tiho