# Join Id and Name

**URL:** https://discuss.elastic.co/t/join-id-and-name/344898
**Category:** Logstash
**Created:** [October 12, 2023, 10:48am UTC](https://discuss.elastic.co/t/join-id-and-name/344898 "2023-10-12T10:48:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Samuele\_Lolli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samuele_lolli/32/107848_2.png) [@Samuele\_Lolli](https://discuss.elastic.co/u/Samuele_Lolli)
#### Post date: [October 12, 2023, 10:48am UTC](https://discuss.elastic.co/t/join-id-and-name/344898/1 "2023-10-12T10:48:50Z")

</div>

Hi everyone,  
im parsing with logstash some message containing an ID refering to an user, i need to add the name of the user with the specific ID. I have all the User and ID in a CSV file.  
Which one is the best way to add the name corrisponding to the id in my index?  
Thank you in advance

---

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [October 12, 2023, 3:30pm UTC](https://discuss.elastic.co/t/join-id-and-name/344898/2 "2023-10-12T15:30:59Z")

</div>

You can use [the translate plugin](https://www.elastic.co/guide/en/logstash/current/plugins-filters-translate.html). Try with this:

```auto
      translate {
	    field => "[userid]"
	    dictionary_path => "/path/file.csv"
	    target => "username"
	    exact => true
      }

```

The file.csv need to have the head with userid, username.  
_userid, username_  
_test, [test@domain.com](mailto:test@domain.com)_

---

<div class="post-metadata">

### Author: ![Samuele\_Lolli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samuele_lolli/32/107848_2.png) [@Samuele\_Lolli](https://discuss.elastic.co/u/Samuele_Lolli)
#### Post date: [October 13, 2023, 8:24am UTC](https://discuss.elastic.co/t/join-id-and-name/344898/3 "2023-10-13T08:24:04Z")

</div>

Hi @Rios,  
thank you! I'm gonna try it soon but i think that can be the solution!

---

<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: [November 10, 2023, 8:24am UTC](https://discuss.elastic.co/t/join-id-and-name/344898/4 "2023-11-10T08:24:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
