I have done some transformations in Dataform and have BQ tables consisting of the transformed data. I have a data pipeline running through Airflow and all is ok
Now, I want another task in airflow to do the following:
I’d break down the puzzle into a series of piece parts. Take each one in turn. From a high level, it sounds like you want to email one or more people with an attachment of CSVs from one or more tables. Breaking this down, it feels like you want logic that may be:
For Each table {
export the table to Google Cloud Storage as a CSV
}
And then an email processor which emails each of your users passing the externalized CSVs as attachments. You will likely then want to clean up / remove the attachments files stored on GCS. You can export to CSV in GCS using EXPORT DATA. It looks like you can use Airflow BigQuery operators to execute BQ SQL to export the CSV (ref) and you can use SendGrid to send an email from Airflow.
I notice that there is a “new” option in town called “Application Integration” (ref) that seems to be an alternative option … however … I just noticed that there isn’t an obvious “email attachment” feature in the Send Email task (ref).