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 2021/01/05 05:57:46 UTC

[GitHub] [airflow] johnwesonga opened a new issue #13480: MSSQL to GCS Operator has no support for FLOAT field types when generating the schema

johnwesonga opened a new issue #13480:
URL: https://github.com/apache/airflow/issues/13480


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**: 1.10.10
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): N/A
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: GCP Compute Engine
   - **OS** (e.g. from /etc/os-release): Ubuntu Linux
   - **Kernel** (e.g. `uname -a`):  SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   
   Extract data containing float values in JSON format from MSSQL (Cloud SQL) to GCS using the MsSqlToGoogleCloudStorageOperator. The Schema generated sets the field type to integer and during import to BigQuery this fails with the error below
   
   `'message': 'Error while reading data, error message: JSON parsing error in row starting at position 140815647: Could not convert value \'number_value: "0.0"\' to integer. Field: Credit; Value: 0.0'}]
   `
   **What you expected to happen**:
   
   Schema should have set this field type to FLOAT
   
   <!-- What do you think went wrong? -->
   
   mssql_to_gcs only seems to have support for INTEGER, TIMESTAMP and NUMERIC. This https://github.com/apache/airflow/pull/11540 PR adds support for DATETIME conversion and field type but is yet to be merged into main.
   
   **How to reproduce it**:
   
   Connect to MSSQL (Cloud SQL or a local instance) and use MsSqlToGoogleCloudStorageOperator and run task to extract data with float values from table. Run another task using GoogleCloudStorageToBigQueryOperator to import the data to BigQuery.
   
   
   **Anything else we need to know**:
   
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   


----------------------------------------------------------------
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 #13480: MSSQL to GCS Operator has no support for FLOAT field types when generating the schema

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


   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