# Export Logs in CSV format

**URL:** <https://forum.opensearch.org/t/export-logs-in-csv-format/11373>\
**Category:** OpenSearch Client Libraries\
**Tags:** opensearch-go\
**Created:** [October 30, 2022, 9:41pm UTC](https://forum.opensearch.org/t/export-logs-in-csv-format/11373 "2022-10-30T21:41:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gomze1691](https://avatars.discourse-cdn.com/v4/letter/g/7c8e57/32.png) [@Gomze1691](https://forum.opensearch.org/u/Gomze1691)\
**Post date:** [October 30, 2022, 9:41pm UTC](https://forum.opensearch.org/t/export-logs-in-csv-format/11373/1 "2022-10-30T21:41:19Z")

</div>

Hi

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

---

<div class="post-metadata">

**Author:** ![wbeckler](https://avatars.discourse-cdn.com/v4/letter/w/9d8465/32.png) [@wbeckler](https://forum.opensearch.org/u/wbeckler)\
**Post date:** [October 31, 2022, 4:08pm UTC](https://forum.opensearch.org/t/export-logs-in-csv-format/11373/2 "2022-10-31T16:08:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Gomze1691](https://avatars.discourse-cdn.com/v4/letter/g/7c8e57/32.png) [@Gomze1691](https://forum.opensearch.org/u/Gomze1691)\
**Post date:** [October 31, 2022, 8:49pm UTC](https://forum.opensearch.org/t/export-logs-in-csv-format/11373/3 "2022-10-31T20:49:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wbeckler](https://avatars.discourse-cdn.com/v4/letter/w/9d8465/32.png) [@wbeckler](https://forum.opensearch.org/u/wbeckler)\
**Post date:** [November 1, 2022, 3:51pm UTC](https://forum.opensearch.org/t/export-logs-in-csv-format/11373/4 "2022-11-01T15:51:20Z")

</div>

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