# Is Pipeline able to enrich data with a field of another line in same index?

**URL:** <https://discuss.elastic.co/t/is-pipeline-able-to-enrich-data-with-a-field-of-another-line-in-same-index/307988>\
**Category:** Elasticsearch\
**Tags:** ingest-pipeline\
**Created:** [June 23, 2022, 10:22am UTC](https://discuss.elastic.co/t/is-pipeline-able-to-enrich-data-with-a-field-of-another-line-in-same-index/307988 "2022-06-23T10:22:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastien\_Taniere](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastien_taniere/32/59265_2.png) [@Sebastien\_Taniere](https://discuss.elastic.co/u/Sebastien_Taniere)\
**Post date:** [June 23, 2022, 10:22am UTC](https://discuss.elastic.co/t/is-pipeline-able-to-enrich-data-with-a-field-of-another-line-in-same-index/307988/1 "2022-06-23T10:22:17Z")

</div>

Hello,  
I have to ingest this type of data :

```auto
[2022-06-23 12:11:53 INF] [Env=] [Depot=] [Activity=] [RequestId=0HMIJARNNC6FT:00000002] Request finished HTTP/1.1 GET http://xxxx.yyyy:5000/api/Weight/GetPickLineSupportWeight?activityCode=SDO&depositCode=ECR&supportNumber=336042897206443351 application/json - - 200 356 application/json;+charset=utf-8 71.6420ms
[2022-06-23 12:11:53 INF] [Env=PECRRFX2] [Depot=ECR] [Activity=SDO] [RequestId=0HMIJARNNC6FT:00000002] Executed endpoint 'FMServices.Specific.Controllers.Api.WeightVolume.WeightController.GetPickLineSupportWeight (FMServices.Specific)'
[2022-06-23 12:11:53 INF] [Env=PECRRFX2] [Depot=ECR] [Activity=SDO] [RequestId=0HMIJARNNC6FT:00000002] Executed action FMServices.Specific.Controllers.Api.WeightVolume.WeightController.GetPickLineSupportWeight (FMServices.Specific) in 70.9943ms

```

problem is that field Activity is null for last line of log  
I would like to be able when ingesting it to take activity value of another line of same index to update activity value if it is null

In following snapshot, I would like to be able to set Env=PECRRFX2 to last line by getting it from same index in the previous line :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/9/696b09917f8803ece14fc9be65d79455dcad8f63.png)  
if I could do a search for RequestId=0HMIJARNNC6FT:00000002, I may be able to find non null value. But I don't know how to do it in a pipeline (it seem we may use enriched-index, but this index should not be dynamic)

Do you know a way to do that in an ingest pipeline in elastic ?  
or perhaps in filebeat ?

---

<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:** [July 21, 2022, 10:22am UTC](https://discuss.elastic.co/t/is-pipeline-able-to-enrich-data-with-a-field-of-another-line-in-same-index/307988/2 "2022-07-21T10:22:19Z")

</div>

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