Currently, I have Power Query queries in Excel that send SQL queries from ".sql" files to PI SQL Data Access Server (RTQP Engine). However, this approach causes a "Native Database Query" warning window to appear when the SQL query is first used after any changes are made to it, and I would like the users to not have to deal with this window. The solution would be to convert my SQL queries to pure Power Query code and let Power Query perform query folding, which will convert the Power Query query to an SQL query for the database (SQL Data Access Server (RTQP Engine) in this case) to run.
I set up a basic 2-step test query using only Power Query code. However, when I right-clicked on the last step of the query in the Power Query Editor, the "View Native Query" option was greyed out, which means that I cannot tell if the query was folded.
Therefore, I am looking for a way to tell which queries are sent to the PI SQL Data Access Server (RTQP Engine). It does not matter to me if the capture of the queries occurs on the client end or on the server end. If anyone has any experience with using query folding with PI SQL Data Access Server (RTQP Engine), then I would appreciate any advice that you can give me. For example, which of the 3 variants of PI SQL Client (OLEDB, ODBC, or JDBC) is best suited for query folding?
Thanks in advance!