# Ingest pipeline - How to stores the split values into separate new fields?

**URL:** <https://discuss.elastic.co/t/ingest-pipeline-how-to-stores-the-split-values-into-separate-new-fields/200567>\
**Category:** Elasticsearch\
**Created:** [September 22, 2019, 10:04am UTC](https://discuss.elastic.co/t/ingest-pipeline-how-to-stores-the-split-values-into-separate-new-fields/200567 "2019-09-22T10:04:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chanakagl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chanakagl/32/54677_2.png) [@chanakagl](https://discuss.elastic.co/u/chanakagl)\
**Post date:** [September 22, 2019, 10:04am UTC](https://discuss.elastic.co/t/ingest-pipeline-how-to-stores-the-split-values-into-separate-new-fields/200567/1 "2019-09-22T10:04:07Z")

</div>

How to stores the split values (using split processor) into three new fields?  
here is my pipeline but need to store split values to separate 3 fields. I have tried set array list on target\_field parameter but look likes it's not supporting. Can someone pls help?

PUT \_ingest/pipeline/split\_act\_scene\_line  
{  
"description": "split words on line\_number field",  
"processors": [  
{  
"split": {  
"field": "line\_number",  
"separator": "\.+",  
"target\_field": ["field1", "filed2", "filed3"]  
}  
}  
]  
}

ex:- "\_source": {  
"line\_number": "1.2.3"  
}

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [September 23, 2019, 8:34am UTC](https://discuss.elastic.co/t/ingest-pipeline-how-to-stores-the-split-values-into-separate-new-fields/200567/2 "2019-09-23T08:34:32Z")

</div>

I don't think this is possible with just the `split` processor. Instead, you can first split into a temporary field, and then next use three `set` processors to assign the different array elements to the different fields:

```auto
POST _ingest/pipeline/_simulate
{
  "pipeline": {
    "description": "split words on line_number field",
    "processors": [
      {
        "split": {
          "field": "line_number",
          "separator": "\\.+",
          "target_field": "temporary_field"
        }
      },
      {
        "set": {
          "field": "field1",
          "value": "{{temporary_field.0}}"
        }
      },
      {
        "set": {
          "field": "field2",
          "value": "{{temporary_field.1}}"
        }
      },
      {
        "set": {
          "field": "field3",
          "value": "{{temporary_field.2}}"
        }
      },
      {
        "remove": {
          "field": "temporary_field"
        }
      }
    ]
  },
  "docs": [
    {
      "_source": {
        "line_number": "1.2.3"
      }
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![chanakagl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chanakagl/32/54677_2.png) [@chanakagl](https://discuss.elastic.co/u/chanakagl)\
**Post date:** [September 23, 2019, 9:45am UTC](https://discuss.elastic.co/t/ingest-pipeline-how-to-stores-the-split-values-into-separate-new-fields/200567/3 "2019-09-23T09:45:32Z")

</div>

It worked. @abdon Thank you very much..!

---

<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:** [October 21, 2019, 9:45am UTC](https://discuss.elastic.co/t/ingest-pipeline-how-to-stores-the-split-values-into-separate-new-fields/200567/4 "2019-10-21T09:45:36Z")

</div>

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