RosterIn commented on issue #4802: [AIRFLOW-3978] - Add TIME, BINARY, VARBINARY 
to MySqlToGoogleCloudStorageOperator
URL: https://github.com/apache/airflow/pull/4802#issuecomment-469015885
 
 
   I tested my changed only for the `TIME ` field and it doesn't work either.
   
   ```
   File "/NewOperators/mysql_to_gcs_mymodification.py", line 105, in execute
   files_to_upload = self._write_local_data_files(cursor)
   File "/NewOperators/mysql_to_gcs_mymodification.py", line 151, in 
_write_local_data_files
   s = json.dumps(row_dict)
   File "/usr/lib/python2.7/json/__init__.py", line 244, in dumps
    return _default_encoder.encode(obj)
   File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
   chunks = self.iterencode(o, _one_shot=True)
   File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
   return _iterencode(o, 0)
   File "/usr/lib/python2.7/json/encoder.py", line 184, in default
   raise TypeError(repr(o) + " is not JSON serializable")
   TypeError: datetime.timedelta(0, 86385) is not JSON serializable
   ```
   
   I'm closing this PR as I don't have time to refactor / investigate this.
   
   If any one has the time to fix this operator you are welcome to take this.
   
   Currently the operator doesn't work for column types : TIME, BINARY, 
VARBINARY  and I assume that there are more types that aren't supported.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to