airflow.contrib.operators.mysql_to_gcs
¶
MySQL to GCS operator.
Module Contents¶
-
class
airflow.contrib.operators.mysql_to_gcs.
MySqlToGoogleCloudStorageOperator
(mysql_conn_id='mysql_default', ensure_utc=False, *args, **kwargs)[source]¶ Bases:
airflow.contrib.operators.sql_to_gcs.BaseSQLToGoogleCloudStorageOperator
Copy data from MySQL to Google cloud storage in JSON or CSV format.
- Parameters
-
convert_type
(self, value, schema_type)[source]¶ Takes a value from MySQLdb, and converts it to a value that’s safe for JSON/Google cloud storage/BigQuery. Dates are converted to UTC seconds. Decimals are converted to floats. Binary type fields are encoded with base64, as imported BYTES data must be base64-encoded according to Bigquery SQL date type documentation: https://cloud.google.com/bigquery/data-types
- Parameters
value (Any) – MySQLdb column value
schema_type (str) – BigQuery data type