# How to add field value to \_Id value using logstash

**URL:** https://discuss.elastic.co/t/how-to-add-field-value-to-id-value-using-logstash/152107
**Category:** Logstash
**Created:** [October 11, 2018, 6:26pm UTC](https://discuss.elastic.co/t/how-to-add-field-value-to-id-value-using-logstash/152107 "2018-10-11T18:26:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![venkat\_venkat](https://avatars.discourse-cdn.com/v4/letter/v/f17d59/32.png) [@venkat\_venkat](https://discuss.elastic.co/u/venkat_venkat)
#### Post date: [October 11, 2018, 6:26pm UTC](https://discuss.elastic.co/t/how-to-add-field-value-to-id-value-using-logstash/152107/1 "2018-10-11T18:26:43Z")

</div>

I have a requirement that has to add one of the field value in the documet to \_id value using logstash while indexing.

Ex:

{

This the document coming to Elasticsearch using logstash.

\_id : 1

“coloum\_XXXX": 10000032,

"rowid\_XXXX": 222333

"name": "John Doe”,

"City": “Sanjose”,

"Postal": 5601,

"address": “65 Reo Robles"

}

We have to provide rowid no(value) to \_id (Value)  
We have to convert this to

{

\_id: 222333

“coloumn\_XXXX": 10000032,

"rowid\_XXXX": 222333

"name": "John Doe”,

"City": “Sanjose”,

"Postal": 5601,

"address": “65 Reo Robles"

}

Please do neadfull.

Thanks,  
Venkatesh.

---

<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: [November 8, 2018, 6:26pm UTC](https://discuss.elastic.co/t/how-to-add-field-value-to-id-value-using-logstash/152107/2 "2018-11-08T18:26:46Z")

</div>

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