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.

Oozie email workflow with attachment

Oozie email workflow with attachment

New Contributor

I would like to know whether we can attach a file in the email workflow of oozie.  If so, can you explain with example.

6 REPLIES 6

Re: Oozie email workflow with attachment

Master Guru
An ability to attach files to email actions will arrive in CDH 5.5 onwards.
Current CDH5 releases do not have this recently added Oozie feature.

For a preliminary version of the new documentation, see
http://nightly.cloudera.com/cdh5/cdh/5/oozie/DG_EmailActionExtension.html

Re: Oozie email workflow with attachment

New Contributor

Hi,

 

 Thanks for your quick reply. Is there any workaround to show the content of log file in the mail after the workflow completed.

Re: Oozie email workflow with attachment

Rising Star

I think it depends on how much of the log file you want to see.

 

If it's just a few lines, you can read the log file in a shell script and print out those lines as LINE1=... , LINE2=... etc. Then check the "Capture output" flag on the Oozie shell action, which will create variables that you can then pick up in your email action with the syntax ${wf:actionData('YourShellAction')['LINE1']} etc.

 

Hope this helps.

 

Martin

 

Re: Oozie email workflow with attachment

New Contributor

Hello 

 

Is it possible to disable this feature, where we dont want to allow the users to attache HDFS files to emails. 

 

Thanks in advacne for the reply. 

Abraham 

Highlighted

Re: Oozie email workflow with attachment

Master Guru
Yes, apply 'oozie.email.attachment.enabled' as false in your Server's
oozie-site.xml.

Attachments are disabled by default too.

Re: Oozie email workflow with attachment

New Contributor

Hello Harsh

 

Thanks for reply. 

 

We are using Cloundera Manager. 

Can you please let me know how this can be done via Cloudera Manager. 

 

I checked the file in the Oozie server host via Oozie-Server-->Processes-->Oozie-site.xml

and couldnt find the field in the file. 

oozie.email.attachment.enabled

 

Regards

Abraham