Skip to content

Writing data with less than second precision #145

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

Closed
jchauncey opened this issue Jun 1, 2016 · 8 comments
Closed

Writing data with less than second precision #145

jchauncey opened this issue Jun 1, 2016 · 8 comments

Comments

@jchauncey
Copy link

So I am trying to write data with either millisecond or nanosecond precision and neither works.

If I try to generate an integer that represents millisecond precision (since epoch):

timestamp = (Time.now.to_f * 1000).to_i

I get the following error:

time outside range 1677-09-21 00:12:43.145224192 +0000 UTC - 2262-04-11 23:47:16.854775807 +0000 UTC

I am trying to do what the tests show but that doesn't seem to be working

@jchauncey
Copy link
Author

@dmke
Copy link
Contributor

dmke commented Jun 1, 2016

This might be a bug in the test, I will have a closer look tomorrow.

Which version of InfluxDB were you testing against?

@jchauncey
Copy link
Author

0.13
On Jun 1, 2016 4:03 PM, "Dominik Menke" [email protected] wrote:

This might be a bug in the test, I will have a closer look tomorrow.

Which version of InfluxDB were you testing against?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#145 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAaRGOijgCENWBnKxalte-UQrrrYNDRWks5qHgGegaJpZM4IsAqo
.

@dmke
Copy link
Contributor

dmke commented Jun 1, 2016

I believe the test is indeed faulty: precision: "m" indicates minutes, not milliseconds (which would be ms), see "duration units" in the language spec.

@jchauncey
Copy link
Author

Yeah I tried it with ms too and same error.
On Jun 1, 2016 4:21 PM, "Dominik Menke" [email protected] wrote:

I believe the test is indeed faulty: precision: "m" indicates minutes,
not milliseconds (which would be ms), see "duration units"
https://docs.influxdata.com/influxdb/v0.13/query_language/spec/#durations
in the language spec.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#145 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAaRGOEOmEZVnhoqviiRWKchWlQ0RCVWks5qHgXrgaJpZM4IsAqo
.

@jchauncey
Copy link
Author

The weird thing that happens is if I dont send any timestamp value and let Influx handle that I end up with second precision.

@jchauncey
Copy link
Author

So I figured out the issue I think. Basically I am trying to write a bunch of data to 1 database. Some of that data is coming from telegraf and I think its resolution (even though I have it configured differently) is to the second.

If I create a new database and write the data with the ruby client with millisecond precision everything seems to work just fine.

@jchauncey
Copy link
Author

closing this issue as i figured out my problem.

dmke added a commit that referenced this issue Jun 6, 2016
@dmke dmke mentioned this issue Jun 7, 2016
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

No branches or pull requests

2 participants