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.
I have issues with the ODBC and at this time, I got tired of trying. Rather, I was lucky to understand the syntax of Value.NativeQuery(). Below is my approach, along with the syntactic explanation.
1. Open Blank Query
2. Go to Advanced Editor
3. Edit the Source = "" to the following below.
Source = Value.NativeQuery(
// target as any - we will choose PostgreSQL
PostgreSQL.Database("insert_host", "insert_dB_name"),
// query as text - basically just change double quotes into two double quotes, and add #(lf) after every line
"
SELECT
#(lf)""Field_1"",
#(lf)""Field_2""
#(lf)FROM ""Table_1""
"
// optional parameters as any - null is the default optional, I will leave this here
, null
// optional options as nullable record - [EnableFolding=true] is default which you can delete the whole thing
// , [EnableFolding=true] - safe to delete
)
I used Excel to concatenate my query into something readable in M.
This should be the accepted solution. Totally works. Thanks mate! I would have had to wait ages for the POWER BI folks to solve the raised idea of enabling folding=False.