airflow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jayesh Senjaliya <>
Subject Re: How to query a database and then send an email with the query results?
Date Fri, 10 Mar 2017 23:19:53 GMT
Hi Anne,

I would go with first approach unless the result can be very big, since all
xcom results gets stored in airflow db.

another approach would be to use MySQLOperator + EmailOperator within
as a wrapper. you ll have to execute the operator manually in the code

if nothing works, one can always fall back to bare python code.

- Jayesh

On Fri, Mar 10, 2017 at 2:34 PM, Anne Yeung <> wrote:

> Hi Airflow community,
> Does anyone have a recommendation on how I run a database query and then
> email the results in a nicely formatted HTML table to a list of emails?
> I'm thinking of using a MySQLOperator + EmailOperator and passing the
> results between the two tasks using xcom, but I'm also thinking that I
> could just use a PythonOperator and manually add in the db connection and
> query. Anyone have recommendation on how they do it?
> Thanks,
> Anne

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message