-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Support a sample function: Nth point in interval #8969
Comments
This isn't a bug, but is the documented behavior: https://docs.influxdata.com/influxdb/v1.3/query_language/data_exploration/#common-issues-with-basic-syntax That said, there have been several requests for features which would allow you to control the time value returned in the results, such as #5793 & #5926 |
@phemmer Is there any workaround? |
Have you reviewed the sample function that is available via Kapacitor? Does this sound more like what you are attempting to do: https://docs.influxdata.com/kapacitor/v1.3/nodes/sample_node I realize that it is another "part" to add to the setup. However, for more advanced data handling use cases we typically see Kapacitor used as co-processor with the database to achieve these kinds of results. |
@timhallinflux That looks interesting. One important criteria for us is that the points of both the start and the end of the interval are included. Is this still possible with the sampling in kapacitor? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions. |
Bug report
System info:
Influx v1.3
Ubuntu
Steps to reproduce:
We are trying to sample our data. We have millions of points and want to fetch every Nth point in a given interval. We have implemented a solution that calculates the time difference in this interval and then groups by it to receive the correct amount of points.
SELECT last(value) as value FROM measurement WHERE time >= '...' AND time <= '...' GROUP BY time(calculated_time) fill(none)
The amount of points returned seems to be correct, but the dates are not.
Expected behavior:
I expect the data to be returned to have the correct timestamp as in the database, regardless of the time used in the aggregation function.
Actual behavior:
The time returned seems to be a multiple of the aggregated time. That is, if my aggregation is
GROUP BY time(7m)
then the points seem to a multiple of 7 apart.See this:
In comparison to:
The text was updated successfully, but these errors were encountered: