# Data Merge/Enrichment

**URL:** <https://discuss.elastic.co/t/data-merge-enrichment/77868>\
**Category:** Elasticsearch\
**Created:** [March 8, 2017, 6:20pm UTC](https://discuss.elastic.co/t/data-merge-enrichment/77868 "2017-03-08T18:20:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mryia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mryia/32/16195_2.png) [@mryia](https://discuss.elastic.co/u/mryia)\
**Post date:** [March 8, 2017, 6:20pm UTC](https://discuss.elastic.co/t/data-merge-enrichment/77868/1 "2017-03-08T18:20:19Z")

</div>

Hi

First of all I want to say that I am completely new to the ELK stack, but I have a project to test it out. Short about my project is that I am pulling real time data about arrivals and departures from five of the largest airports in Norway. This is dynamic data which I update every five min with updates about delays, new gates etc. I update this from a SQL like this:

input {  
jdbc {  
jdbc\_connection\_string =\> "jdbc:mysql://localhost:3306/avinor"  
jdbc\_user =\> "user"  
jdbc\_password =\> "pass"  
jdbc\_driver\_library =\> "/xxx/xxx/xxx/mysql-connector-java-5.1.41/mysql-connector-java-5.1.41-bin.jar"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
statement =\> "SELECT \* FROM temp\_BGO"  
}  
}  
output {  
stdout { codec =\> json\_lines }  
elasticsearch {  
"hosts" =\> "localhost:9200"  
"index" =\> "bgo"  
"document\_type" =\> "data"  
"document\_id" =\> "%{flight}"  
}  
}

One of the columns in this database is called "iata", and holds the IATA code of the airport (e.g. LAX for Los Angeles) the flight is either departing for, or arriving from.

I also have a file which contains deeper information about all the airports in the world. It looks like this:  
3484,"Los Angeles International Airport","Los Angeles","United States","LAX","KLAX",33.94250107,-118.4079971,125,-8,"A","America/Los\_Angeles","airport","OurAirports"

What I want is to enrich my real time data for my five airports with information from this file with full name, Country, coordinates etc etc. I could of course do this in SQL, but I was wondering if there is a smarter way to do this in the ELK stack?  
Is there a way to make some sort of pointer in my real time data pointing to the database of airport, or would I have to merge it in to elasticsearch? The database containing information about the airports is static, so no need to update that.

Any input would be very much appreciated.  
Thanks!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 8, 2017, 7:41pm UTC](https://discuss.elastic.co/t/data-merge-enrichment/77868/2 "2017-03-08T19:41:59Z")

</div>

Have a look at the translate filter, it should help.

---

<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:** [April 5, 2017, 7:42pm UTC](https://discuss.elastic.co/t/data-merge-enrichment/77868/3 "2017-04-05T19:42:17Z")

</div>

Closed on April 5, 2017, 7:42pm UTC

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