You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The line protocol now requires that int's be explicitly defined via a trailing 'i' (see influxdata/influxdb#3526).
It's currently impossible to accomplish this using the #write_point/#write_points methods, so you'll wind up with an error like this:
InfluxDB::Error: write failed: field type conflict: input field "foo" on measurement "bar" is type float64, already exists as type integer
I'm happy to work up a PR, but I'm not sure what the best approach is. I don't know that we can simply tack on an 'i' for all Fixnums without breaking things for users currently passing them to float fields.
Right now, my temporary workaround is to add a wrapper class around Fixnum that tacks on an 'i' in its #to_s method, which I then pass to #write_point, but that's not a longterm/ideal solution, unless it's exposed by the gem itself.
The text was updated successfully, but these errors were encountered:
jimryan
changed the title
Need ability to explicitly define int field values with #write_point(s)
Need ability to explicitly define int field values passed to #write_point(s)
Nov 19, 2015
The line protocol now requires that int's be explicitly defined via a trailing 'i' (see influxdata/influxdb#3526).
It's currently impossible to accomplish this using the
#write_point
/#write_points
methods, so you'll wind up with an error like this:I'm happy to work up a PR, but I'm not sure what the best approach is. I don't know that we can simply tack on an 'i' for all
Fixnums
without breaking things for users currently passing them tofloat
fields.Right now, my temporary workaround is to add a wrapper class around
Fixnum
that tacks on an 'i' in its#to_s
method, which I then pass to#write_point
, but that's not a longterm/ideal solution, unless it's exposed by the gem itself.The text was updated successfully, but these errors were encountered: