DSL query executed on ES

Hi,

Running following query on ElasticSearch 6.3.2 data source and could get the result.

SELECT requestuid
FROM ES."blue-account-2018.08".doc
group by requestuid
having count(requestuid) = 1

Is there a way to find the query that was formed and executed on ES by Dremio? I want to use that converted query to create a filter in Kibana.

Thank you!

I just tried:

SELECT city
FROM elastic.yelp.business
GROUP BY city HAVING COUNT(*) > 1

And this produced:

00-08                    ElasticScan(table=[[elastic, yelp, business]], resource=[yelp/business], columns=[[`*`]], pushdown
 =[{
  "size" : 0,
  "query" : {
    "match_all" : { }
  },
  "aggregations" : {
    "city" : {
      "terms" : {
        "field" : "city",
        "missing" : "NULL_STRING_TAG",
        "size" : 2147483647
      }
    }
  }
}])

You can find this information by going to the Query Profile, navigate to the Planning tab, then scroll down to Final Physical Transformation.

Keep in mind this may not be equivalent to your SQL. Dremio will push down what it can, then perform any missing SQL primitives in its own SQL engine. Joins, for example, cannot be pushed down. It may also opt to perform certain tasks in its own engine if it determines that is more efficient than a push down.