Skip to content
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

Help with writing in batches #220

Open
hoellwerth opened this issue Jul 10, 2023 · 3 comments
Open

Help with writing in batches #220

hoellwerth opened this issue Jul 10, 2023 · 3 comments

Comments

@hoellwerth
Copy link

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

@vlastahajek
Copy link
Collaborator

@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.

@hoellwerth
Copy link
Author

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

@vlastahajek
Copy link
Collaborator

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.

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