Forum Discussion
Query Folding - disable?
- 6 years ago
Hi Anonymous ,
After researching and testing,I am afraid that you could not turn off query folding currently.
However, you could vote for this idea which is similar to yours. Maybe it will be a feature of Power BI in the future.
Anonymous yes that is a workaround, however, it assumes you were able to load data up into Power Query in the first place.
If you're loading data via the PostgreSQL connector for the first time, you're given 3 options in the error that comes up:
- Retry: Just resubmits the query again, after which you get the same errors and options
- Edit: Takes you back to the screen to edit the custom query, no option to remove query folding there
- Cancel: Give up on trying to bring in data altogether (obviously not what anyone here wants)
One option would be to hand-write a native query, and by golly that's just too much work. At my organization, we're using ODBC connectors for PostgreSQL instead. No issues to speak of using that method as of the time I'm writing this.
The PostgreSQL driver for ODBC can be found at the bottom of the page linked here, and it's pretty easy to set up:
https://www.postgresql.org/ftp/odbc/versions/msi/
When you do set it up on your local machine (Start > type "ODBC", click "ODBC Data Sources"), make sure you add the ODBC driver to the "System DSN" tab. And if you use a VM as a gateway, make sure you set it up on your local machine (for Power BI desktop) and the VM (for scheduled refreshes) exactly the same (notably, with the same "Data Source Name").
My workaround is this:
I am able to load a simple query such as "select * from primary_table limit 1". Or, I can connect directly to a table or view in our back end. As long as I don't write a custom query, I am able to load a table. Once the table is loaded, I can manipulate it however I want. Not ideal, but this works for now.