-
Notifications
You must be signed in to change notification settings - Fork 11
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
field type error #29
Comments
Hello @sonejostudios It caused by 2 possible root causes. 1. Influx Bug:When dropping the measurement, actually it is not totally "dropped", see more info here: influxdata/influxdb#10052 How to fix:
If "my_column" data is really float, try to use the solution here: Or simple directly: If "my_column" data is integer, see: 2. It is a really type Issue 2. It is a really Type Issue:So your previous "my_column" data is really integer type. For your "my_column", the So, seems your previous data in "my_column" are all int, so the tool treats them as int and insert to influx. How to fix:
Use Hope could be the help to you. |
Hi @Bugazelle , |
Hello @Bugazelle, there might be another problem. If I have a float value, that ends with 0, like 123.0, then "export-csv-to-influx" is interpreting it as int. |
UPDATE I think, I've found the cause of this behavior. The function is_integer() returns true for numbers with only a zero behind the dot: https://python-reference.readthedocs.io/en/latest/docs/float/is_integer.html |
Hello @valbewe Glad that we could be the help. The is_integer() you mentioned is very helpful!! BTW, BEST REGARDS TO YOU 😊 |
Hi @Bugazelle ,
While injecting my csv with your Python module, it works really well if I drop the measurement first.
But now I've got the following problem: I' want to inject a lot more point and don't want to drop the measurement each time. If I drop_measurement=False, then I get the following error while re-injecting the data:
The weird thing is, my .csv is float only but it seems to be injected as integer? and then it gives me this error, that the type is different?
Is this a bug or is this intentional? How can I set the type while injecting? I really don't care about the type, I just want all fields as float.
Thank you in advance!
The text was updated successfully, but these errors were encountered: