How can I make a join between two file?


#1

Hi!
I have two files: us_data_flights and us_states_geo_coordinates.

a) In the file us_data_flights there are data about flights in 2015 with information about departure/arrival state, air_time, delay etc...
b) In the file us states_geo_coordinates there are geo-coordinates for every state.

I would like to generate a Map with delay metrics with kibana.
How can I make a join between field 'state' of file a) and field 'state" of file b) in order to extract coordinates to plot on map?
Thank you very much at all!


(Mark Walkom) #2

You cannot, you need to enrich the data during indexing.


#3

Thank you for your answer. Could you suggest me how can I join the two file using Logstash?
Thank you!


(Isabel Drost-Fromm) #4

Your problem sounds like you should first denormalize your data before it reaches Elasticsearch. Here are a few pointers to deal with relational data in ES:

https://www.elastic.co/guide/en/elasticsearch/guide/current/relations.html

https://www.elastic.co/guide/en/elasticsearch/guide/current/modeling-your-data.html

https://www.elastic.co/guide/en/elasticsearch/guide/current/denormalization.html

Hope this helps,
Isabel


#5

Thank you very much for your help! Isabel!


(Mark Walkom) #6

Look at the translate filter.


#7

Thank you very much warkolm! Translate filter is great!
But now I have another problem....
:sweat:

:grin:


(system) #8