Support Questions

Find answers, ask questions, and share your expertise

Oozie - Is there a way to capture output of Sqoop eval node in other oozie nodes ?

avatar

I have an Oozie job that is performing sqoop import action. I want to add another sqoop eval node to this job to run sqoop eval query on source database to get control totals and insert control totals to another Hive table. Is there a way to capture output of sqoop eval node in Oozie ?

1 ACCEPTED SOLUTION

avatar
Master Guru

I don't think so. there is no capture output attribute in the sqoop action XML. However you could run a sqoop command in a shell or ssh action ( the latter I did the first might need the sqoop libraries added which might be more setup). You could then capture the output of the shell or ssh action. Essentially run sqoop in a shellscript and grep the output you want and put it into key=value pairs. Those you can then use in the following action eval for example.

View solution in original post

3 REPLIES 3

avatar
Master Guru

I don't think so. there is no capture output attribute in the sqoop action XML. However you could run a sqoop command in a shell or ssh action ( the latter I did the first might need the sqoop libraries added which might be more setup). You could then capture the output of the shell or ssh action. Essentially run sqoop in a shellscript and grep the output you want and put it into key=value pairs. Those you can then use in the following action eval for example.

avatar

Thank You @Benjamin Leonhardi. That was my thought process also. I am planning to skip Oozie and just run my sqoop scripts, capture output and grep for keys. Thanks for validating it.

avatar
Expert Contributor

Same issue with Hive action. It is frustrating and inefficient that such a common use case cannot be accommodated.