I have a Vega visualization working with harcoded data points. I have pasted the code in Kibana and works identically to the Vega editor.
Now I want to replace hardcoded data points with the equivalent Elasticsearch query. I have pushed those 4 datapoints as 4 documents into my Elasticsearch index, but I can't figure out how to actually make it work. I have replaced the data with the following:
Can you post your whole spec? I am guessing where you use name field you would need to do _source.name instead. But would need to see your full spec with data.
Thanks for the answer! If I do that, then no data is displayed. Isn't the problem that querying Elasticsearch puts all the datapoints into the "_source" field, and so that's why I need to type it?
Sorry I was just looking how to clear the error. You have an issue with your data and transformations. You have a bunch of undefined rows and x, y, and r columns are blank. This is why you aren't seeing anything.
Looks like your data is lacking an ID and Parent ID which is required to make this visualization work according to the Stratify Transform. Take a look at the sample and see what data they start with and what they end with. That's what you need to match.
Yes, the reason for that data being missing is that the "nest" transform is not working, as it's not picking up "p1", "p2" and "p3" correctly. Without Elastic, my data points look like:
{
"p1": "a",
"p2": "b",
"p3": "c",
}
This works fine for the nest transform. However using Elastic, the datapoints look like:
Understand. I am not familiar enough with the nest transformation to help out. Might be worth the time opening an issue on Vegas GitHub support page.
One thing that might help a little is the project transformation. Usually I just add that first and rename all the _source fields to drop that portion to make it easier to work with later.
I can keep looking when I get some more time though.
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.