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:

  1. Create an application.

  2. Add the tables as components with one or more discover rules, and check the components in REDADM.RED_APP_COMPONENTS.

  3. Create an export format for the CSV file.

  4. Create an action export for the view.

  5. Optional: create an own mail template with API_REDADM.SET_MAIL_PARAM, or use the delivered template app_notify_final.

  6. Add the mail export action with the trigger type FINAL (or FINAL_DQ if 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.