Email Notification job is used in Job Flows to send emails to single, or multiple recipients based on the requirement.
To create an Email Notification Job follow the below steps.
Step I: From the Jobs menu, drag and drop the Email Notification job on the canvas.
Step II: Provide the General details of Job.
On Canvas, select the Email Job, and then under Properties, provide the General details.
Name - The Name field displays the name of the job. To edit the Job name, click the arrow next to the name field.
Description - In the text box, you can provide a description and is optional.
Disable task - Check Disable task, if the job need not be executed as part of the Job Flow, and you do not want to delete the Job.
Step III: Provide the properties for the Job.
Step I: Under Properties tab, you can provide the details for fields To, CC, Subject, Message, through an Expression Editor.
To - Provide the valid email address of the main recipients.
CC - Provide the valid email address of the recipients to whom you want to share the copy for their information.
Subject - Provide a short description of the email message.
Message - Provide the email message with all details.
To provide details for any of the above fields, click on the Expression Editor arrow, and you can provide the values for fields in editor.
Step II: The Expression Editor window opens, and you can define the field value here. The value defined can include Parameters, Runtime Status and Runtime Statistics.
- The Parameters can consists of Job Flow Parameter, Job Flow sql Parameter, Project Parameter, or System Parameter. For more information, refer Working with Job Flow Parameters, Working with Job Flow SQL Parameters, Working with Project Parameters, and Working with Studio System Parameters.
- Runtime Job Status and Statistics - It consists of Runtime Status and Runtime Statistics of Job. You can use Runtime Status and Runtime Statistics to get particular details of Job. For more information, refer Working with runtime status and statistics.
Step III: To attach any of the log from the server in the email, click on the server icon.
Choose the log file you want to attach.
Step IV: Assign Agent
1. To assign or change the associated agent click Change.
- If Default agent is assigned to the Project then automatically, the Default agent will be associated with the Email Notification job created.
- If Default agent is not assigned to the Project then, no agent will be assigned automatically and appropriate agent needs to be assigned to the Email Notification job.
2. The Agent window lists all the available Agents. Choose the required Agent.
Step V: Optionally specify the retry attempts for Email Notification job execution.
Retry Enabled: Check the retry option if you want to enable retry attempts for Email Notification job.
- No. of Retry Attempts: Specify the number of attempts to retry Email Notification job execution if in case the job fails to execute. By default, the retry attempts is set to 2.
- Retry Wait Time (in Seconds): Specify the duration in seconds for the job to retry next execution. By default, the duration is set to 60 seconds. If the Job fails to execute, it retries again for next execution attempt after the specified wait time.
- To save the Job Flow, on the Actions menu, click Save. For more information, refer Saving Job Flow.
- To revert the changes before saving the Job Flow, on the Actions menu, click Revert. For more information, refer Reverting changes in Job Flow.
- To execute individual job in the Job Flow, on the Actions menu, click Run Job. For more information, refer Executing individual Job in Job Flow.
- To execute the Job Flow, on the Actions menu, click Run. For more information, refer Executing Job Flow.
- Once the Job is created and the changes are saved, then, close or unlock the Job Flow so that it is editable by other users. For more information, refer Closing Job Flow and Unlocking Job Flow.