Our data engineering team masks sensitive columns in the Fabric warehouse, so the data is masked at rest. The requirement is that all users should see unmasked values in a Power BI report, while non power bi users (developers having direct access to the warehouse) continues to see masked values. We're talking a few columns across thousands of rows, not one record at a time.
The team has proposed doing this with Translytical Task Flows calling a Fabric User Data Function.
Having read through the docs, I'm sceptical this fits:
TTF only fires on an explicit user action (button), so unmasked data can never be the default state on report open.
The function returns a string, not a dataset — so it can't feed values back into the model directly.
It writes to a data source, meaning unmasked values would have to be persisted somewhere (perhaps staging table), then picked up on refresh/reframe. That puts clear text at rest, which defeats the point of masking in the first place.
Every documented scenario is a single-record write — add, edit, delete, annotate.
So, questions:
Has anyone actually built column-level unmasking using TTF + UDF? If so, how did you handle the persistence and per-user isolation? How would the report which is build on the some tables would additionally show data from the unmasked data stored in staging table ? What kind of modeling is required here?
If not, what are people using for conditional masking in Fabric where the model can be Direct Lake/Import
Not looking to be told it's a bad idea — I suspect that already. Genuinely want to know if someone has made it work, or what the accepted pattern is for such a use case.
Thanks for the perspectives.