You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/10/09 05:33:57 UTC

[GitHub] [airflow] QuinRiva opened a new issue #11370: MSSQLToGCSOperator fails: datetime is not JSON Serializable

QuinRiva opened a new issue #11370:
URL: https://github.com/apache/airflow/issues/11370


   **Apache Airflow version**: 1.10.12
   
   **Environment**:  Centos 7 Host
   
   - **Cloud provider or hardware configuration**: 
   - **OS** (e.g. from /etc/os-release): Ubuntu 20.04 Docker Container
   - **Kernel** (e.g. `uname -a`): Linux c6c6e8230c17 3.10.0-1127.18.2.el7.x86_64 #1 SMP Sun Jul 26 15:27:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
   - **Install tools**: Docker Compose
   - **Others** ?
   
   **What happened**:
   
   MSSQLToGCSOperator fails due to datetime JSON Serialization issue.  Converting datetime to string removes this issue.
   
   **What you expected to happen**:
   
   Data transfer without error.
   
   **How to reproduce it**:
   Ensure dbo.Customers table has a timestamp/datetime column:
   
   export_customers = MsSqlToGoogleCloudStorageOperator(
                   task_id='export_customers',
                   sql='SELECT * FROM dbo.Customers;',
                   bucket='mssql-export',
                   filename='data/customers/export.json',
                   schema_filename='schemas/export.json',
                   mssql_conn_id='mssql_default',
                   google_cloud_storage_conn_id='google_cloud_default',
                   dag=dag
               )
   
   **Solution**:
   A solution has already been submitted here:
   https://gist.github.com/Tomme/af6908e10ed969039d83e3bde2443648#gistcomment-3242915


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #11370: MSSQLToGCSOperator fails: datetime is not JSON Serializable

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #11370:
URL: https://github.com/apache/airflow/issues/11370#issuecomment-705977571


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #11370: MSSQLToGCSOperator fails: datetime is not JSON Serializable

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #11370:
URL: https://github.com/apache/airflow/issues/11370#issuecomment-705977571


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
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:
users@infra.apache.org