# Customer id

**URL:** <https://discuss.elastic.co/t/customer-id/29020>\
**Category:** Logstash\
**Created:** [September 10, 2015, 11:37am UTC](https://discuss.elastic.co/t/customer-id/29020 "2015-09-10T11:37:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scaarup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scaarup/32/4615_2.png) [@scaarup](https://discuss.elastic.co/u/scaarup)\
**Post date:** [September 10, 2015, 11:37am UTC](https://discuss.elastic.co/t/customer-id/29020/1 "2015-09-10T11:37:56Z")

</div>

I am indexing logdata in elasticsearch with a string like "customerid=1234". I have a csv/database with relations between a customer-name and the customerid. Could I add a field automatically so the customers name gets sent as a field to elasticsearch along with the rest of the data?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 10, 2015, 11:51am UTC](https://discuss.elastic.co/t/customer-id/29020/2 "2015-09-10T11:51:36Z")

</div>

If you can transform the file with the additional customer data into a YAML file, you should be able to use the [translate plugin](https://www.elastic.co/guide/en/logstash/current/plugins-filters-translate.html) to enrich the events based on the customer id.

---

<div class="post-metadata">

**Author:** ![scaarup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scaarup/32/4615_2.png) [@scaarup](https://discuss.elastic.co/u/scaarup)\
**Post date:** [September 13, 2015, 2:51pm UTC](https://discuss.elastic.co/t/customer-id/29020/3 "2015-09-13T14:51:53Z")

</div>

Tried it out, and it works great 🙂 Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:29am UTC](https://discuss.elastic.co/t/customer-id/29020/4 "2017-07-06T05:29:14Z")

</div>


