InfluxDB-Client-for-Arduino icon indicating copy to clipboard operation
InfluxDB-Client-for-Arduino copied to clipboard

Help with writing in batches

Open hoellwerth opened this issue 2 years ago • 3 comments

As i could't find any contact data, I thought of just opening this issue here.

Overall I need a function which gets data its according timestamps from two arrays and then flushes everything in them into influxdb. I tried my best with the example batch code, but couldn't adapt it far enough.

Thanks for your help

hoellwerth avatar Jul 10 '23 23:07 hoellwerth

@Baumistlustig, you haven't specified any details about arrays. Basically, if both arrays contain related data and have the same size, you can just iterate over both in a single for loop where you will fill a Point and then immediately write this point. After the loop just call Flush() to make sure all is written.

vlastahajek avatar Jul 13 '23 10:07 vlastahajek

@vlastahajek Thanks for your answer. Could you maybe provide a minimal example? Thanks

hoellwerth avatar Jul 14 '23 18:07 hoellwerth

A minimal example is already in the SecureBatchWrite example, where there is iteration over found networks.

Post here, what you have and what doesn't work.

vlastahajek avatar Jul 17 '23 11:07 vlastahajek