[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to insert/update row in Spanner where column type is FLOAT64 and value is either integer or ends with .00 #2873

Closed
chaitanya9186 opened this issue Oct 15, 2018 · 1 comment
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@chaitanya9186
Copy link
chaitanya9186 commented Oct 15, 2018

Environment details

  • OS: linux
  • Node.js version: v8.12.0
  • npm version: 6.4.1
  • google-cloud-node version: 2.1.0

Steps to reproduce

  1. require google-cloud
  2. Create a spanner table in a database with a FLOAT64 data type.
  3. try to insert/update with 1.00 or 1 through nodejs.

Use-case: User sends us data to insert as a JSON message, we do not have any knowledge of the table schema, we try to insert the same data as-it-is, so we are facing this error when the user is trying to insert/update the FLOAT64 cloumn with either an integer or value ends with .00 spanner is throwing following error:
Error: 9 FAILED_PRECONDITION: Invalid value for column score in table test1: Expected FLOAT64.

I have gone through the suggestion here: #2307

But our problem is that we have no context of table schema, there is no Spanner API available to check the column types (as of my knowledge), I have created a FR: googleapis/nodejs-spanner#368, but it was closed due to insufficient info.

Please suggest a way to over come this. As you are accepting JSON data please fix this accordingly.

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants