Forum Discussion
Power BI Dataflow: Formula Firewall error with PostgreSQL, JSON transforms, and Custom Functions
- 5 months ago
Good Afternoon,
Today i had time to work on it:
To do a test and understeand better the problem -> i created 2 different files with only 2 tabels “report_WA” and "report_s_Phase".
In both the files i keep the 2 functions but:
- In the first i recall the function in only one of the 2 tables -> and if i put this file on powerbi service -> there aren’t firewall problems in powerquery.
- In the first i recall the function in both the 2 tables -> and if i put this file on powerbi service -> there is the firewall block in powerquery
So i understood the problem are not the function themselves but how the firewall “panics” if they are recall by multiple tables.
So i created other 2 files with 2 different SOLUTIONS:
1)First file (Works but i discarded) -> your suggested solution of cramming all the 2 functions in each table and removing the separate object functions -> it works but is not optimize and difficult to maintain/debug.
2)Second file (Works and i chose it because it’s faster and more dynamic(i tested both in service and desktop with the analyzer).
By creating "Load Disabled" staging queries, you split the execution graph into two safe phases. Phase 1: Connect and extract. Phase 2: Transform in memory. The firewall easily maps this dependency and allows the refresh to pass seamlessly in the Service.
Now i will procede with implementing this "stage solution" on my main file with all the tables.
I wish this solution can be useful for others in the future,(if you see any problem in my logic let me know)
Thank you all : )
Good Afternoon,
Today i had time to work on it:
To do a test and understeand better the problem -> i created 2 different files with only 2 tabels “report_WA” and "report_s_Phase".
In both the files i keep the 2 functions but:
- In the first i recall the function in only one of the 2 tables -> and if i put this file on powerbi service -> there aren’t firewall problems in powerquery.
- In the first i recall the function in both the 2 tables -> and if i put this file on powerbi service -> there is the firewall block in powerquery
So i understood the problem are not the function themselves but how the firewall “panics” if they are recall by multiple tables.
So i created other 2 files with 2 different SOLUTIONS:
1)First file (Works but i discarded) -> your suggested solution of cramming all the 2 functions in each table and removing the separate object functions -> it works but is not optimize and difficult to maintain/debug.
2)Second file (Works and i chose it because it’s faster and more dynamic(i tested both in service and desktop with the analyzer).
By creating "Load Disabled" staging queries, you split the execution graph into two safe phases. Phase 1: Connect and extract. Phase 2: Transform in memory. The firewall easily maps this dependency and allows the refresh to pass seamlessly in the Service.
Now i will procede with implementing this "stage solution" on my main file with all the tables.
I wish this solution can be useful for others in the future,
(if you see any problem in my logic let me know)
Thank you all : )
- v-kpoloju-msft5 months ago
Community Support
Hi Jacopo_Fabbri,
Good to hear you were able to isolate the behavior. Your findings are absolutely correct. The issue isn’t with the function itself, but with how the Power BI Privacy Firewall evaluates dependencies when the same function is invoked across multiple tables. Your staging approach using load disabled queries is the recommended pattern, as it separates data access from transformations and avoids cross-source evaluation conflicts in the Service. This is a solid and scalable solution, so you can confidently proceed with implementing it in your main model.
Thanks for sharing your findings with us. This will be helpful for other members who are facing similar issues.