Forum Discussion
Obtaining the sql query
Hi,
Does anyone know if it is possiable to obtain the actual database sql query from the semantic layer without executing the semantic layer query itself?
Thanks
Not really. Neither OLAP cubes nor SSAS Tabular run on SQL. It's either MDX or DAX.
Have a look at DAX Studio. It allows you to see which SQL-like queries are run under the hood, but those are informational only and cannot be used in any of the client tools.
6 Replies
- lbendlinSuper User
For Import Mode and generic Direct Query you can run DMV queries to return the partition definition. But if the data source query folds then you cannot retrieve that folded SQL.
- v-prasareCommunity Support
Hi rpwils,As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for your issue worked? or let us know if you need any further assistance here?
lbendlin , Thanks for your promt response.
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query
- rpwilsNew Member
Sorry for the delayed response. I am not sure I fully understand how I can get a full sql before its ran on the semantic model from DMV queries. Within other semantic solutions like atscale, lookml and cube.dev, you can submit a list of dimensions from the semantic model to select on and filter by and and a sql query will be returned. Then you can choose to execute it. Does that make sense?
- lbendlinSuper User
Not really. Neither OLAP cubes nor SSAS Tabular run on SQL. It's either MDX or DAX.
Have a look at DAX Studio. It allows you to see which SQL-like queries are run under the hood, but those are informational only and cannot be used in any of the client tools.
- v-prasareCommunity Support
Hi rpwils, as we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for your issue worked? or let us know if you need any further assistance here?
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query
- v-prasareCommunity Support
rpwils as we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for your issue worked? or let us know if you need any further assistance here?
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query