Hi Just wanted to check again if someone had any suggestions.
Thanks Narayanan On Sun, Jun 8, 2014 at 8:07 AM, Narayanan K <[email protected]> wrote: > Hi, > > Basically I wanted to run a hive query in Oozie and store the output > in a file after formatting and send it as an attachment to some e-mail > addresses. > > I read about sendMail action , but it doesn't seem to be providing > support for attachments. > > So here is what I did using a shell script in SHELL ACTION : (I copied > the script.hql and formatter.pl in the same location as workflow.xml) > > -------- > > hive -f script.hql | perl formatter.pl > /tmp/output.csv > > echo "Attached results" | mutt -s "Results" -a /tmp/output.csv -- > [email protected] > > -------- > > But this doesn't seem to work. > > One is : It is not able to find the hive client in the Oozie launcher. > I tried "which hive" in the above script and it is giving empty. I was > wondering how oozie launchers executed hive action without a hive > client. > > Secondly, the mutt command is giving an error message : > > "Stdoutput Could not send the message." > > I tried to do something like : echo "Hello World" > /tmp/test > and then used mutt to send this file, but still the same error > message. But "which mutt" > gave that it was installed: /usr/bin/mutt... > > > Is this the approach tested by someone already.? What am I missing here ? > > Are there any alternative approach for this requirement ? > > Thanks > Narayanan
