Forum Discussion

Jacopo_Fabbri's avatar
Jacopo_Fabbri
Regular Visitor
5 months ago
Solved

Power BI Dataflow: Formula Firewall error with PostgreSQL, JSON transforms, and Custom Functions

Hi everyone, I'm hitting a Formula Firewall wall in a Power BI Service Dataflow and I need to resolve it without losing my complex transformation logic in the report_WA query. The Setup: Source: ...
  • Jacopo_Fabbri's avatar
    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 : )