-
Notifications
You must be signed in to change notification settings - Fork 524
Fix chunked query to return chunk resultsets #753
Conversation
I'm currently running tox tests and will fix whatever fails in travisCI |
2a2d459
to
a6bc05d
Compare
Option to dump data in a folder in fragment files of a given chunk size. This works only if the chunksize option is properly implemented in influxdb-python (see influxdata/influxdb-python#753)
Does this also close #538 ? |
Yes, it covers it as well. I've had issues with my laptop so got caught in a bit of a snag, will get back to fixing the tests. |
a6bc05d
to
3832bd3
Compare
I had to change the test substantially as it was testing a broken behavior not the documented (and better one imho). |
On a side note, I've been using this code to move data from an old version of influxdb to 1.7 (and doing some type casting in the middle) with no issue. About 50G of data across 1500 measurements. |
When querying large data sets, it's vital to get a chunked responses to manage memory usage. Wrapping the query response in a generator and streaming the request provides the desired result. It also fixes `InfluxDBClient.query()` behavior for chunked queries that is currently not working according to [specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L429) close influxdata#585 close influxdata#531
3832bd3
to
67301be
Compare
Thanks @russorat, hopefully this PR is getting some attention while the new library is getting all the love ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great stuff, thank you @hrbonz!
When querying large data sets, it's vital to get a chunked responses to manage memory usage. Wrapping the query response in a generator and streaming the request provides the desired result. It also fixes `InfluxDBClient.query()` behavior for chunked queries that is currently not working according to [specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L429) Closes influxdata#585. Closes influxdata#531. Closes influxdata#538.
awesome! thank YOU for actually implementing it all the way :) |
When querying large data sets, it's vital to get a chunked responses to manage memory usage. Wrapping the query response in a generator and streaming the request provides the desired result.
It also fixes
InfluxDBClient.query()
behavior for chunked queries that is currently not working according to specsclose #585
close #531
close #538