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

Write all numbers as floats #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andreas-berg
Copy link

I had the type conflict issues for numbers.
Both the:

  1. 'write failed: field type conflict: input field "XYZ" on measurement "ZYX" is type int64, already exists as type float
  2. 'write failed: field type conflict: input field "ABC" on measurement "ZYX" is type float64, already exists as type integer

InfluxDB (v2) sets the type int or float for a specific field based on the data first written (to a shard(!) impossible to control) and since javascript/typescript both input values 1.0 and 1 are Number.isInteger == true, then it's only a matter of time before a subsequent write fails in the above mentioned errors.

An old InfluxDB discussion (2015) suggest always writing numbers as floats (except for the timestamp), so this PR suggests doing the same in the n8n-nodes-influxdb-package.

@N1k145
Copy link

N1k145 commented Sep 1, 2024

I just had the same issue with this node, It would be great if @naskio could take a look at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants