{
"@timestamp": "...",
"email": "bob@gmail.com",
"activity": "bob's first activity"
},
{
"@timestamp": "...",
"email": "bob@gmail.com",
"activity": "bob's second activity"
}
I want to create a graph that counts the activities per user.
I did something like this:
But I want to change the email with name field (from users index). I need to present real names in the legend.
Is there a way to do that? JOIN?
I don't mind to use visualization in dashboard or canvas / any other solution (rather than SQL) that supports that.
This is currently not possible to do at query time (as it would require to join documents). You need to move this kind of enriching your event index into the ingest phase.
Given your example documents the above produces 2 results which I believe is what you need. Would need to do an aggregation or 2 still to get counts but the start is there.
I didn't do the visualization part. Just the data portion.
There is a lot left to do in Vega still for this and would require learning it first unfortunately.
The way I learned is going through the examples at https://vega.github.io/vega/examples/ and then loading those in the editor and seeing what everything does.
Say you do a query in Vega that returns 9,000 results all that data goes to the client and then processed. The max return by default is 10,000 so if you need to query above that you need update settings.
Also if you put a Vega visualization in a dashboard the UI loads for the dashboard and then the data processes for Vega. Meaning if it's a lot of data that visualization could appear a few seconds after the rest of the dashboard does.
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.