title: Airflow: Best way to pass BigQuery result as XCom
body: <p>I'm using <code>Cloud Composer (Airflow)</code> to export data from <code>MySQL</code> into <code>BigQuery</code> daily.
  The MySQL table has an incremental id as <code>PRIMARY KEY</code>. 
  To append only the new rows every day I need to:</p>
  
  <ol>
  <li>Query the BQ table to find the <code>max(id) AS bq_max_id</code></li>
  <li>Export the MySQL new data <code>WHERE id &gt; bq_max_id</code> to GCS</li>
  <li>Load the GCS data to BQ</li>
  </ol>
  
  <p>To do the first step I need to use 2 operators</p>
  
  <pre><code>  select_max_id = bigquery_operator.BigQueryOperator(
          task_id='select_max_id',
          bql="""
              SELECT max(id) AS max_id
              FROM some_schema.some_table
          """,
          use_legacy_sql=False,
          destination_dataset_table='some_schema.xcom_value_table')
  
    pull_xcom_value = bigquery_get_data.BigQueryGetDataOperator(
          task_id='pull_xcom_value',
          dataset_id='some_schema',
          table_id='xcom_value_table')
  </code></pre>
  
  <p>And then I use a <code>BashOperator</code>to delete the xcom_value_table.</p>
  
  <p>Is there a better way of passing a BQ query result as an XCom than creating a table and using 3 operators?</p>