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 pythonOperator as a wrapper. you ll have to execute the operator manually in the code though. if nothing works, one can always fall back to bare python code. - Jayesh On Fri, Mar 10, 2017 at 2:34 PM, Anne Yeung <aye...@squareup.com> 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 >