# Mapper\_parsing\_exception

**URL:** <https://discuss.elastic.co/t/mapper-parsing-exception/261871>\
**Category:** Logstash\
**Created:** [January 22, 2021, 6:28am UTC](https://discuss.elastic.co/t/mapper-parsing-exception/261871 "2021-01-22T06:28:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adityak248](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@adityak248](https://discuss.elastic.co/u/adityak248)\
**Post date:** [January 22, 2021, 6:28am UTC](https://discuss.elastic.co/t/mapper-parsing-exception/261871/1 "2021-01-22T06:28:24Z")

</div>

Hello Team,  
I have been getting this issue no matter what. I have applied mutate (convert,rename) json but still get the following issue.

```auto
"reason"=>"Could not dynamically add mapping for field [app.kubernetes.io/name]. Existing mapping for [kubernetes.labels.app] must be of type object but found [text].

"reason"=>"Could not dynamically add mapping for field [app.kubernetes.io/instance]. Existing mapping for [kubernetes.labels.app] must be of type object but found [text].

```

Here is the snippet of the stdout logstash

```auto
"labels" => {
            "app.kubernetes.io/instance" => "project-prod",
                "app.kubernetes.io/name" => "project",
                     "pod-template-hash" => "9h346436"

```

Could you tell me how and what I should be doing, here?  
BTW mapping is dynamic too!

---

<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:** [January 22, 2021, 5:31pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception/261871/2 "2021-01-22T17:31:13Z")

</div>

What does the [mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html) look like for those fields?

---

<div class="post-metadata">

**Author:** ![adityak248](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@adityak248](https://discuss.elastic.co/u/adityak248)\
**Post date:** [January 22, 2021, 5:37pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception/261871/3 "2021-01-22T17:37:12Z")

</div>

Here it is,

```auto
"mappings" : {
      "dynamic" : "true"

```

---

<div class="post-metadata">

**Author:** ![adityak248](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@adityak248](https://discuss.elastic.co/u/adityak248)\
**Post date:** [January 22, 2021, 10:05pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception/261871/4 "2021-01-22T22:05:01Z")

</div>

Solution I did was, I renamed the filed using mutate, rename and I got something like this

```auto
"labels" => {
            "appInstance" => "project-prod",
                "appName" => "project",
                     "appPodTemplateHash" => "9h346436"

```

---

<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:** [February 19, 2021, 10:05pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception/261871/5 "2021-02-19T22:05:29Z")

</div>

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