MySQL To Google Cloud Storage Operator¶
The Google Cloud Storage (GCS) service is used to store large data from various applications. This page shows how to copy data from MySQL to GCS.
MySQLToGCSOperator allows you to upload
data from MySQL database to GCS.
When you use this operator, you can optionally compress the data being uploaded to gzip format.
Below is an example of using this operator to upload data to GCS.
upload = MySQLToGCSOperator( task_id='mysql_to_gcs', sql=SQL_QUERY, bucket=GCS_BUCKET, filename=FILENAME, export_format='csv' )