I just started my journey with Canvas and I am confused. If I put together a SQL query in the developer tools section and everything appears to work correctly; then I attempt to use that same query in canvas I get nothing. When I say nothing I mean no error, no output, just nothing. I started by attempting a drop down box so I built a query that returns a list of applications. Again the SQL works in DEV tools, gets nothing in Canvas. I am willing to admit fault here but some guidance would be useful. My query is as follows:
{
"query": "SELECT kubernetes.labels.app FROM "k8s-prod-myapp-*" GROUP BY kubernetes.labels.app"
}
When editing an expression in canvas, only include the SQL statement. Wrapping the expression in a JSON object is causing your problems. So just enter SELECT kubernetes.labels.app FROM "k8s-prod-myapp-*" GROUP BY kubernetes.labels.app.
DEV tools is just editor that allows you to craft any Elasticsearch REST API request. In DEV tools, the entire request body is needed since you are writing raw requests. In Canvas, the UI is just for entering the SQL statement and the Canvas does the rest and converts the SQL statement into a REST request for you
What does the canvas request look like in the Browser's dev tools? Can you open your browser's dev tools and monitor the network traffic when you try your canvas expression? What do you see for fns request?
Unfortunately that is not what I an seeing. What I see is a ton of request that are getting a 400 error. I am working right now to see if this is related to a config issue on the server. One moment..
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.