# Logstash 7.2.0 \_mutate\_error

**URL:** https://discuss.elastic.co/t/logstash-7-2-0-mutate-error/193086
**Category:** Logstash
**Created:** [July 31, 2019, 9:56am UTC](https://discuss.elastic.co/t/logstash-7-2-0-mutate-error/193086 "2019-07-31T09:56:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Orest\_Gulman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/orest_gulman/32/46463_2.png) [@Orest\_Gulman](https://discuss.elastic.co/u/Orest_Gulman)
#### Post date: [July 31, 2019, 9:56am UTC](https://discuss.elastic.co/t/logstash-7-2-0-mutate-error/193086/1 "2019-07-31T09:56:55Z")

</div>

hi, I'm using Logstash 6.8.0 for parsing logs, It works fine. I'm splitting "path" field using current pipeline:

```
   if [path] and !([path] == "/") {
    mutate {
      copy => {"path" => "path_split"}
   }
    mutate {
      split => {"path_split" => "/"}
      add_field => { "url" => "%{path_split[1]}" } 
    }
   }

```

But when I tryed it in Logstash 7.2.0, I'm getting an error:

```
[2019-07-31T09:29:37,717][WARN][logstash.filters.mutate] Exception caught while applying mutate filter {:exception=>"Invalid FieldReference: `path_split[1]`"}
[2019-07-31T09:29:37,717][WARN][logstash.filters.mutate] Exception caught while applying mutate filter {:exception=>"Invalid FieldReference: `path_split[1]`"}

```

Could you please help me to solve the issue, thanks.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [July 31, 2019, 12:21pm UTC](https://discuss.elastic.co/t/logstash-7-2-0-mutate-error/193086/2 "2019-07-31T12:21:56Z")

</div>

> [@Orest\_Gulman](#):
>
> %{path\_split[1]}

That should be %{[path\_split][1]}

---

<div class="post-metadata">

### Author: ![Orest\_Gulman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/orest_gulman/32/46463_2.png) [@Orest\_Gulman](https://discuss.elastic.co/u/Orest_Gulman)
#### Post date: [July 31, 2019, 1:14pm UTC](https://discuss.elastic.co/t/logstash-7-2-0-mutate-error/193086/3 "2019-07-31T13:14:12Z")

</div>

> [@Badger](#):
>
> That should be %{[path\_split][1]}

thank you!

---

<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 28, 2019, 1:14pm UTC](https://discuss.elastic.co/t/logstash-7-2-0-mutate-error/193086/4 "2019-08-28T13:14:13Z")

</div>

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