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
{{ message }}
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
I found that if you are using simple select query "select * from measurement where t = X" without quotes, result becomes unpredictable. For it's unclear why I should use quotes for time, if time is integer (or long).
I see this behaviour in the InfluxDB web interface too, so I guess this is a general InfluxDB thing (as per your original ticket) rather than specific to the Python library?
The documentation says that you should omit the quotes but append a code for the units of the timestamp... Sadly it doesn't appear to have a code for nanoseconds, but if you alter your code to look like this then it seems to work for your example:
result = db.query('select * from {0} where time={1}u'.format(measurement, t/1000))
Further investigation suggests that InfluxDB actually ignores any timestamp that you put in quotes! For example, editing your check_one_way call to double the timestamp still returns the same result:
result = db.query('select * from {0} where time="{1}"'.format(measurement, t*2))
I found that if you are using simple select query "select * from measurement where t = X" without quotes, result becomes unpredictable. For it's unclear why I should use quotes for time, if time is integer (or long).
The text was updated successfully, but these errors were encountered: