_export:
td:
database: your_database
table: your_table
+prep_table:
# Rejected users will be assigned to this table.
td_ddl>:
empty_tables: ["${td.table}"]
+exec_job:
td>: sample.sql
+custom_script:
py>: mailchimp.start
_env:
# NOTE: Using secrets feature is better.
MAILCHIMP_APIKEY: 'your Mailchimp API key'
MAILCHIMP_SERVER: 'user Mailchimp server'
TD_API_KEY: 'your Treasure Data api key'
TD_API_SERVER: 'https://api.treasuredata.com'
# Properties for Mailchimp
audience_name: 'Audience name'
reason: 'Write the reason why customers get this notification.'
template_name: 'Template name (Email content)'
campaign_title: 'campaign name 1'
# Properties for Treasure Data
job_id: ${td.last_job_id}
db: ${td.database} # This value will be used for rejected users.
table: ${td.table} # This value will be used for rejected users.
# TODO: Write the notify email address column to match the column name of your query.
# i.e. notification_email, user_email, executor_email, and so on.
email: notification_email
docker:
image: "digdag/digdag-python:3.9"