Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to create a lookup based on Hive query result?

How to create a lookup based on Hive query result?

New Contributor

Hello all,

I'm trying to pass an attribute value (${new_filename}) and compare it to the hive table results like select * from table where filename=${new_filename}. If first lookup succeeds then the check if an HDFS directory exists, if first lookup fails then put file in another directory.

For now I have ListHDFS->FetchHDFS->UpdateAttribute (to get the ${new_filename})-> SelectHIVE (select * from table where filename=${new_filename}).


Now, will the SelectHIVE result in a failure relationship if the condition is not met?

And also, do I need to create ConvertAvroToJSON->SplitJson->EvaluateJSONPath->ReplaceText ?

How to check if a directory with that ${new_filename} exists in HDFS ?


I appreciate any help I can get.

Thanks,