Oozie fs:exists with variables -
i'm struggeling on following problem using variables in oozie workflow definition checking if specific file created. working absolute path following, cannot use absolute path:
${fs:exists('/mypath/file.hql')}
in case, namenode , workflow id has replaced in decision node not working. variables not replaced, correct syntax this?
<decision name="check-hql-file-created"> <switch> <case to="hive-exec-il2rl-hql4baseentity"> ${fs:exists(${namenode}'/tmp/oozie_tmp/'${wf:id()}'.hql')} </case> <default to="il2rl-loop"/> </switch> </decision>
it working concatenation following:
<switch> <case to="hive-exec-il2rl-hql4baseentity"> ${fs:exists(concat(concat(concat(concat(concat(namenode, '/tmp/oozie_tmp/'), wf:id()), '_'), replaceall(asjson, "\\{\"|,.+$", "")), '.hql')) == "true"} </case> <default to="il2rl-loop"/> </switch>
Comments
Post a Comment