Export Logs in CSV format

Hi

Is there any OpenSearch library in Golang that I can use to export the logs in CSV format? Thanks

Can you zoom out and explain your challenge further? For example, why are you looking to use the golang client? What frameworks are you using? There are csv libraries in golang, and the results of a search can be processed via those libraries. The golang opensearch client is agnostic as to where the data outputs after the query happens, and its most typical use case is to be embedded in a larger application with export or visualization features.

1 Like

Hi @wbeckler

So I am storing some customer sensitive log in the opensearch. We may need to share it with customer on demand.

As I understand the best idea is to query the data and then use some third party SDK to convert into CSV format

That sounds right. Although maybe you mean library rather than SDK.