Closed youngzhaozju closed 7 months ago
I am also interested in a solution for this. /cc @msrd0
Feel free to open a PR which adds batch inserting. Should not be very hard to implement.
I'm also looking for bulk writing of lines and I'd be interested in providing a PR, but i'm not sure I read the terminology in this library correctly. It looks like client.query()
with a WriteQuery
hits the /write
endpoint. Does that mean that a WriteQuery.get
produces a line protocol from an InfluxDbWriteable
? If so would a reasonable interface for bulk inserts look like a new BulkWriteQuery
which can be constructed from an iterable of InfluxDbWriteable
and itself contains an iterable of WriteQuery
so that it can then generate a post body of line feed separated line protocols? Thx.
Ok, never mind. v0.5.2
already has support for Vec<WriteQuery>
as a query type for client.query()
. Looking at the code, this was added in #87 back on 3/6/21. I just tested the code and it works, so this issue should be closed, unless I mis-read the request.
Ah, right. Maybe you can update the Readme Supported Features and add it there?
Updated: #112
Closing this, as the README has been updated in #112 to document the bulk write capacity.
Hi, Thanks for the nice project. I want to write some series of data in a time, but I found the client.query() can handel only a series record a time. Is there any way to write may records in a time? Thank you! Regards, Yang