BigQueryToMySqlOperator
GoogleFetches the data from a BigQuery table (alternatively fetch data for selected columns) and insert that data into a MySQL table.
Access Instructions
Install the Google provider package into your Airflow environment.
Import the module into your DAG file and instantiate it with your desired params.
Parameters
Documentation
Fetches the data from a BigQuery table (alternatively fetch data for selected columns) and insert that data into a MySQL table.
See also
For more information on how to use this operator, take a look at the guide: Operator
Note
If you pass fields to selected_fields
which are in different order than the order of columns already in BQ table, the data will still be in the order of BQ table. For example if the BQ table has 3 columns as [A,B,C]
and you pass ‘B,A’ in the selected_fields
the data would still be of the form 'A,B'
and passed through this form to MySQL
Example:
# [START howto_operator_bigquery_to_mysql]transfer_data = BigQueryToMySqlOperator(task_id='task_id',dataset_table='origin_bq_table',mysql_table='dest_table_name',replace=True,)# [END howto_operator_bigquery_to_mysql]