# Does translate filter work with logstash 5.1.2?

**URL:** https://discuss.elastic.co/t/does-translate-filter-work-with-logstash-5-1-2/93394
**Category:** Logstash
**Created:** [July 17, 2017, 12:49pm UTC](https://discuss.elastic.co/t/does-translate-filter-work-with-logstash-5-1-2/93394 "2017-07-17T12:49:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![daaakeee](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@daaakeee](https://discuss.elastic.co/u/daaakeee)
#### Post date: [July 17, 2017, 12:49pm UTC](https://discuss.elastic.co/t/does-translate-filter-work-with-logstash-5-1-2/93394/1 "2017-07-17T12:49:19Z")

</div>

Hello! I am trying to split the message field into array and create many columns according to the list I got.. Can I do this?

logstash filter config is like below:  
`grok {`  
`match => {`  
`"message" => "%{GREEDYDATA:data}"`  
`}`  
`}`  
`mutate {`  
`split => ["data", ":::"]`  
`}`  
`translate {`  
`dictionary => data`  
`}`

message looks like below  
`term:::asd:::session_id:::qwer123asd`

So that I get 2 fields term and session\_id

---

<div class="post-metadata">

### Author: ![jsvd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsvd/32/6203_2.png) [@jsvd](https://discuss.elastic.co/u/jsvd)
#### Post date: [July 21, 2017, 4:24pm UTC](https://discuss.elastic.co/t/does-translate-filter-work-with-logstash-5-1-2/93394/2 "2017-07-21T16:24:40Z")

</div>

the translate filter isn't useful here, maybe something like:

```auto
input { generator { count => 1 message => "term:::asd:::session_id:::qwer123asd" } }
filter {
  mutate { add_field => { "data" => "%{message}" } }
  mutate {
    split => ["data", ":::"]
  }
  ruby { code => 'event.set("data", Hash[*event.get("data")])' }
}
output { stdout { codec => rubydebug } }

```

---

<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: [August 18, 2017, 4:24pm UTC](https://discuss.elastic.co/t/does-translate-filter-work-with-logstash-5-1-2/93394/3 "2017-08-18T16:24:57Z")

</div>

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