Hello Elastic-Community,
I am wondering if there is a way to connect two datasets from two different indexes with each other to create a visualization.
For example:
From Index_1 I receive general informations of a device, that looks like this:
{
"DeviceName": "machine_1",
"ID": 001,
}
And from Index_2 I get temperature-values from this device, but i don't have the "DeviceName"-field:
Now i want to create a visualization, where i can filter or search for the "DeviceName" such as "machine_1" and get the current temperature and a chart with the temperatur over time.
this is unfortunately not really able that way. There is a join field type, but that's unfortunately not supported in Kibana. In general when working with search engines like Elasticsearch (in contrast to relational databases) it's recommended to denormalize data (instead of normalization what you might be used from a relational database), i.e. in this case including the device name into the second document as well. Given how Elasticsearch (and most search engines) are build technically, this is the preferred version for gaining the relevant speed and still be able to execute the desired queries you want.
There are also inbuilt possibilities to do so.
You can use transforms to do the merge or you use the enrich processor on index time.
I would use the second alternative in your case.
@Felix_Roessel
Can you please provide some further information to your suggestion. Where can I find these functionalities and how do I use them correctly?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.