Let's say I have three .json files containing this information:
employees.json:
{
"employee_id":1,
"name":"John"
},
{
"employee_id":2,
"name":"Elton"
}
companies.json:
{
"company_id":1001,
"company_name":"ACME"
},
{
"company_id":1002,
"company_name":"Capsule"
}
where_they_work.json:
{
"company_id":1001,
"employee_id":1
},
{
"company_id":1001,
"employee_id":"2
}
What I want to have, at the end, is one document in Elasticsearch with this information:
Expected result:
{
"employee_id":1,
"name":"John",
"company_name": "ACME"
},
{
"employee_id":2,
"name":"Elton",
"company_name": "ACME"
}
What's the best approach to achive it? I can imagine at least this options:
- Dictionaries (logstash, not good idea, because I'll need to manually update the dictinonary all the time)
- Data Enrichment: Can work, but don't know if it will work with the three .json/indexes, maybe with two works fine.. I don't know.
- "Fancier" options: Rollups? Transforms? Other?
Please help!