# Is there anyway for logstash to join two csv files(m:m relationship) based on a common field, and ingest the data into one single index

**URL:** <https://discuss.elastic.co/t/is-there-anyway-for-logstash-to-join-two-csv-files-m-m-relationship-based-on-a-common-field-and-ingest-the-data-into-one-single-index/195835>\
**Category:** Logstash\
**Created:** [August 20, 2019, 3:21am UTC](https://discuss.elastic.co/t/is-there-anyway-for-logstash-to-join-two-csv-files-m-m-relationship-based-on-a-common-field-and-ingest-the-data-into-one-single-index/195835 "2019-08-20T03:21:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cheriemilk](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@cheriemilk](https://discuss.elastic.co/u/cheriemilk)\
**Post date:** [August 20, 2019, 3:21am UTC](https://discuss.elastic.co/t/is-there-anyway-for-logstash-to-join-two-csv-files-m-m-relationship-based-on-a-common-field-and-ingest-the-data-into-one-single-index/195835/1 "2019-08-20T03:21:15Z")

</div>

Hi Team,

I have 2 csv files with be column info

1. Columns of 1.csv  
`

> caseid, classname, features, actions, author, module, prerequisite, steps, **ation**

`  
2. Columns of 2.csv

`

> module, features, **ation** , ui, ktf1,ktf2,ktf3,......

`  
As I what I put above, there're several common fields between these 2 files. **The relationship between 2 csv files are many to many**. that is one row in 1.csv could map to mulitple rows in 2.csv, and vice versa.

My Requirement:  
Is there any way for logstash to join the rows in these 2 csv files based on the common field **ation**??

---

<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 17, 2019, 3:21am UTC](https://discuss.elastic.co/t/is-there-anyway-for-logstash-to-join-two-csv-files-m-m-relationship-based-on-a-common-field-and-ingest-the-data-into-one-single-index/195835/2 "2019-09-17T03:21:17Z")

</div>

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