Hi Team,
I have 2 CVS files which contains one similar column header say "faculty_id",
For the rows which has same "faculty_id" value, I want the below steps to be done
- Join/combine the data from both the csv files into 1 row, and ingest this row into ElasticSearch.
- If the left or right part in the join is empty, replace the empty with value 'null'
Find the below column header for CSV files,
Column Header of CSV1
faculty_id,faculty_name,reporting_manager
Column Header of CVS2
faculty_id,student_name,batch,year,percentage
Sample Input Data
csv1:
faculty_id,faculty_name,reporting_manager
1,AAA,R1
2,BBB,R2
csv2:
faculty_id,student_name,batch,year,percentage
1,STU1,2k20,2020,90
1,STU2,2k20,2020,78
2,STU3,2k20,2020,85
1,STU4,2k20,2020,75
2,STU5,2k20,2020,80
3,STU6,2k20,2020,80
Sample Result:
faculty_id,faculty_name,reporting_manager,student_name,batch,year,percentage
1,AAA,R1,STU1,2k20,2020,90
1,AAA,R1,STU2,2k20,2020,78
2,BBB,R2,STU3,2k20,2020,85
1,AAA,R1,STU4,2k20,2020,75
2,BBB,R2,STU5,2k20,2020,80
3,null,null,STU6,2k20,2020,80
Could anyone please guide me with the Logstash configuration to achieve the above mentioned scenario.