[AIRFLOW-5553] Update mysql_to_gcs `bytes` check (#6183)
The check for `bytes` type is now based on value type too, not just BQ schema.
This commit is contained in:
Родитель
4d4fda7533
Коммит
22ef5ddbbb
|
@ -119,6 +119,6 @@ class MySqlToGoogleCloudStorageOperator(BaseSQLToGoogleCloudStorageOperator):
|
|||
return value.total_seconds()
|
||||
if isinstance(value, Decimal):
|
||||
return float(value)
|
||||
if schema_type == "BYTES":
|
||||
if isinstance(value, bytes) or schema_type == "BYTES":
|
||||
return base64.standard_b64encode(value).decode('ascii')
|
||||
return value
|
||||
|
|
Загрузка…
Ссылка в новой задаче