# Translate filter with dictionary\_path and a special delimiter

**URL:** https://discuss.elastic.co/t/translate-filter-with-dictionary-path-and-a-special-delimiter/230407
**Category:** Logstash
**Created:** [April 29, 2020, 4:44pm UTC](https://discuss.elastic.co/t/translate-filter-with-dictionary-path-and-a-special-delimiter/230407 "2020-04-29T16:44:38Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![theo1991](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@theo1991](https://discuss.elastic.co/u/theo1991)
#### Post date: [April 29, 2020, 4:44pm UTC](https://discuss.elastic.co/t/translate-filter-with-dictionary-path-and-a-special-delimiter/230407/1 "2020-04-29T16:44:38Z")

</div>

Hello,

Is it possible to specify a delimiter in a translate filter and how ?  
I have a dictionnary in csv where the delimiter is |

This is my current filter :

```auto
translate {
field => [field]
destination => [destination]
refresh_interval => '1000'
dictionary_path => 'dictionary.csv'
}

```

Dictionary file :

1|chicken  
2|bread  
3|potatoes

---

<div class="post-metadata">

### Author: ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)
#### Post date: [April 29, 2020, 5:36pm UTC](https://discuss.elastic.co/t/translate-filter-with-dictionary-path-and-a-special-delimiter/230407/2 "2020-04-29T17:36:23Z")

</div>

Hello @theo1991

Unfortunately it is not possible at the moment.

I've checked the [code](https://github.com/logstash-plugins/logstash-filter-translate/blob/v3.2.3/lib/logstash/filters/dictionary/csv_file.rb#L11) and we use to the CSV Ruby library which defaults to `,` ([CSV](https://ruby-doc.org/stdlib-2.7.1/libdoc/csv/rdoc/CSV.html#method-c-new)).

I suggest to open an feature request on the official repository:

> **[logstash-plugins/logstash-filter-translate](https://github.com/logstash-plugins/logstash-filter-translate/issues)**
>
> Translate filter for Logstash. Contribute to logstash-plugins/logstash-filter-translate development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![theo1991](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@theo1991](https://discuss.elastic.co/u/theo1991)
#### Post date: [April 29, 2020, 6:54pm UTC](https://discuss.elastic.co/t/translate-filter-with-dictionary-path-and-a-special-delimiter/230407/3 "2020-04-29T18:54:08Z")

</div>

Hello Luca,

Thanks for your answer. To fit with my needs, I modify my csv to a json file and it works now. I will open a request for that, thanks !

---

<div class="post-metadata">

### Author: ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)
#### Post date: [April 29, 2020, 6:55pm UTC](https://discuss.elastic.co/t/translate-filter-with-dictionary-path-and-a-special-delimiter/230407/4 "2020-04-29T18:55:20Z")

</div>

Yes modifying the file to json or using commas instead of pipe will work.

---

<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: [May 27, 2020, 6:55pm UTC](https://discuss.elastic.co/t/translate-filter-with-dictionary-path-and-a-special-delimiter/230407/5 "2020-05-27T18:55:23Z")

</div>

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