# Ingest Pipeline that extracts metadata fields into new field

**URL:** <https://discuss.elastic.co/t/ingest-pipeline-that-extracts-metadata-fields-into-new-field/280950>\
**Category:** Elasticsearch\
**Tags:** ingest-pipeline\
**Created:** [August 10, 2021, 5:02pm UTC](https://discuss.elastic.co/t/ingest-pipeline-that-extracts-metadata-fields-into-new-field/280950 "2021-08-10T17:02:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkward](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pkward/32/95305_2.png) [@pkward](https://discuss.elastic.co/u/pkward)\
**Post date:** [August 10, 2021, 5:02pm UTC](https://discuss.elastic.co/t/ingest-pipeline-that-extracts-metadata-fields-into-new-field/280950/1 "2021-08-10T17:02:34Z")

</div>

I'm trying to create an Ingest Pipeline in Elasticsearch 7.4 that will allow me to to take the value of the "\_id" metadata field and copy it into a new field. I've tried using the "set" processor to do this, but I'm unable to do so. Below is the ingest pipeline settings

```auto
PUT _ingest/pipeline/<pipeline name>
{
"description": "Move value from _id metadata field to new_field",
"processors": [
{
    "set": {
         "field": "new_field",
         "value": "{{_id}}"
}
}
]
}

}

```

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [August 10, 2021, 5:07pm UTC](https://discuss.elastic.co/t/ingest-pipeline-that-extracts-metadata-fields-into-new-field/280950/2 "2021-08-10T17:07:53Z")

</div>

Can you try using `"value": "{{{_id}}}"`?

To access field values you need to use triple curly brackets. [[documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.14/ingest.html#access-metadata-fields)]

---

<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 7, 2021, 5:08pm UTC](https://discuss.elastic.co/t/ingest-pipeline-that-extracts-metadata-fields-into-new-field/280950/3 "2021-09-07T17:08:21Z")

</div>

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