none
Getting the SQL behind the Power Query RRS feed

  • Question

  • Hello,

    I'm new to Power BI and working with Excel 2010, so I might write some silly things.

    When designing a query in power query (on a data stored in SQL Server), can I found out what is the SQL that will bring me the same data? It can be very helpful with Xelcius (since Power Pivot doesn't work on Excel 2010).Thanks,

    Thanks,

    Barak

    Wednesday, April 9, 2014 9:22 AM

Answers

  • Hi Barak,

    There is no built-in support to view the T-SQL code that PQ generates and sends to the server. You should be able to get to it by using Fiddler to get network traces for the requests sent by Power Query, or use SQL Profiler to monitor the requests that get to the server.

    Thanks,
    M.

    Wednesday, April 9, 2014 4:32 PM

All replies

  • Hi Barak,

    There is no built-in support to view the T-SQL code that PQ generates and sends to the server. You should be able to get to it by using Fiddler to get network traces for the requests sent by Power Query, or use SQL Profiler to monitor the requests that get to the server.

    Thanks,
    M.

    Wednesday, April 9, 2014 4:32 PM
  • It's been a while I know but I stumbled upon this in a Google search today. I am using Express Profiler v2.1 and it is sensational. I filter the queries by my Login Name, put Express Profiler on screen two and then as I step through my Power Query editor I see each query being sent off to SQL Server in realtime. It is amaze and I am using it to help me optimise my queries so I can minimise calls to the database.

    This might help you or anyone else. I found it difficult to get the Sql Profiler as it has now been deprecated.It is bundled now with SQL Server 2016 and I don't want to have to buy a licence or go through IT to download such a powerful program when all I need is to see "SELECT * FROM customers" etc.

    https://msdn.microsoft.com/en-us/library/ms181091.aspx?f=255&MSPPError=-2147217396

    Wednesday, January 20, 2016 11:49 PM