Elasticsearch DSL

I read on dremio blogs that we can use dremio to generate dsl for elasticsearch from sql. But it is not show full query dsl . just small match all only . May be it is painless as script , BUt how to view that?

Hi @examin

What you can do is run the SQL against Elasticsearch through Dremio. Then click on jobs. Find your job and click on that. On the right pane of the window click profile and a new sub-window opens and click on planning. scroll down to “Final Physical Transformation” and inside that box scroll to “ElasticScan”, usually the last row and you should find the DSL.

Kindly let me know if you are not able to find it

Thanks
@balaji.ramaswamy

Thanks Got it .
I need your advice , on how to handle case function of SQL for elasticsearch. I have to interpreter age into groups like 20-20,30-40 etc. and do querys like counts etc on these age-groups . i use to do these using case in sql.

Hi @examin

Are you getting an error when you try the CASE statement against an Elasticsearch source via Dremio?

Thanks
@balaji.ramaswamy