8. Set Up an Action Sending a CSV File by MailΒΆ
Scenario: Several tables are loaded every day. As soon as all of them have been loaded, a CSV file with the data of a view that combines these tables is to be sent by mail.
The solution is an application with the tables as components and a mail export action (type export_mail) that is triggered when the final status of the application is reached:
Add the tables as components with one or more discover rules, and check the components in
REDADM.RED_APP_COMPONENTS.Create an export format for the CSV file.
Create an action export for the view.
Optional: create an own mail template with API_REDADM.SET_MAIL_PARAM, or use the delivered template
app_notify_final.Add the mail export action with the trigger type
FINAL(orFINAL_DQif a data quality check exists for the application) and activate it.
Check the action in REDADM.RED_APP_ACTIONS. Its runs are shown in REDADM.STA_APP_ACTION_STATUS and REDADM.STA_APP_ACTION_DETAIL.