I want to use the Query Results data source to connect aggregated Elasticsearch results with another source. A problem I am facing is that my Elasticsearch query returns subbuckets within buckets which Redash converts into columns. This is all fine, however, I cannot reliably tell which column names are available.
When I try to query a non existent-column in the Query Results data source I am getting a “No such column” error. So I’d like to know if there is any way to select the existing columns in the redash SQLite syntax in order to avoid running into this error (or maybe even do something like SELECT IF COLUMN EXISTS, ELSE SELECT 0).
Any help would be greatly appreciated.