# Convert Multiple Fields - Ingest Node - Convert Processor

**URL:** <https://discuss.elastic.co/t/convert-multiple-fields-ingest-node-convert-processor/95988>\
**Category:** Elasticsearch\
**Created:** [August 5, 2017, 5:44pm UTC](https://discuss.elastic.co/t/convert-multiple-fields-ingest-node-convert-processor/95988 "2017-08-05T17:44:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandont](https://avatars.discourse-cdn.com/v4/letter/b/a6a055/32.png) [@brandont](https://discuss.elastic.co/u/brandont)\
**Post date:** [August 5, 2017, 5:44pm UTC](https://discuss.elastic.co/t/convert-multiple-fields-ingest-node-convert-processor/95988/1 "2017-08-05T17:44:54Z")

</div>

I want to configure an ingest node to convert multiple fields coming through a pipeline but when I define more than one "convert" processor, I get a duplicate key error in the Kibana console and they overwrite each other. I've done some research but can't seem to find any evidence of this problem anywhere. I can't imagine that a given pipeline is only allowed to convert one field but the documentation only has a single field example. Can anyone help me out?

Thanks,  
Brandon

Here's an example of my desired ingest pipeline:

```
PUT _ingest/pipeline/arduino_temp_parse
{
    "description": "parse the data coming from the arduino sensors",
    "processors": [
        {
            "grok": {
                "field": "message",
                "patterns": [
                    "%{GREEDYDATA:degrees_c}C %{GREEDYDATA:degrees_f}F %{GREEDYDATA:humidity}"
                ]
            },
            "convert": {
                "field": "degrees_c",
                "type": "integer"
            },
            "convert": {
                "field": "degrees_f",
                "type": "double"
            },
            "convert": {
                "field": "humidity",
                "type": "integer"
            }
        }
    ]
}
```

---

<div class="post-metadata">

**Author:** ![brandont](https://avatars.discourse-cdn.com/v4/letter/b/a6a055/32.png) [@brandont](https://discuss.elastic.co/u/brandont)\
**Post date:** [August 5, 2017, 9:05pm UTC](https://discuss.elastic.co/t/convert-multiple-fields-ingest-node-convert-processor/95988/2 "2017-08-05T21:05:16Z")

</div>

After looking at some more examples I found in blog posts, I figured it out. I needed another layer of curly brackets around each of my processors. it worked before adding the extra brackets with a single convert but the brackets were necessary to avoid the duplicate key problem. Here is my new working ingest pipeline.

```
{
    "arduino_temp_parse": {
        "description": "parse the data coming from the arduino sensors",
        "processors": [
            {
                "grok": {
                    "field": "message",
                    "patterns": [
                        "%{GREEDYDATA:degrees_c}C %{GREEDYDATA:degrees_f}F %{GREEDYDATA:humidity}"
                    ]
                }
            },
            {
                "convert": {
                    "field": "degrees_c",
                    "type": "integer"
                }
            },
            {
                "convert": {
                    "field": "degrees_f",
                    "type": "float"
                }
            },
            {
                "convert": {
                    "field": "humidity",
                    "type": "integer"
                }
            }
        ]
    }
}

```

(I also had to use `float` instead of `double`)

---

<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:** [September 2, 2017, 9:05pm UTC](https://discuss.elastic.co/t/convert-multiple-fields-ingest-node-convert-processor/95988/3 "2017-09-02T21:05:46Z")

</div>

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