stackhero-io / node-red-contrib-stackhero-influxdb-v2

Node-RED node to read and write to an InfluxDB v2 database.
31 stars 7 forks source link

int not possible #17

Open fairtv-git opened 2 years ago

fairtv-git commented 2 years ago

When adding a trailing "i" to an integer value I would expect that the influxdb field becomes an integer, but it turns out to be a string instead. A trailing "i" should mark an integer according to the influxdb docu.

best, fairtv

MrSingingClub commented 2 years ago

Same problem here. I had a previos import from mySQL and set the field to integer. In my mwrite payload I set: fields: { Wh: 1 } leads to an error: "Error: 422 on http://localhost:8086/api/v2/write?org=TS-Home&bucket=alfred&precision=s: {"code":"unprocessable entity","message":"failure writing points to database: partial write: field type conflict: input field \"Wh\" on measurement \"Energieverbrauch\" is type float, already exists as type integer dropped=1"}"

I miss the feature to explicitely set the datatype for the field, right?

fairtv-git commented 2 years ago

It does not work with this adapter, so I gave up and went with float/DOUBLE. Im not sure if int would save space or gain performance and finally decided not to care about.

best, fairtv