cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI RLS running extremely slowly with databricks

Clampazzo
New Contributor II

Hi Everyone,
I am brand new to databricks and am setting up my first Semantic Model with RLS and have run into an unexpected problem.

When I was testing my model with filters applied (where the RLS would handle later on) it runs extremely fast.  I look in Query History and I can see the where statement for my filter being applied (which hits a partition) and returns information extremely quickly.  Like in 2 seconds.  We are using a serverless connection.

However, when I setup my RLS in Power BI and then click "view as" and look at the exact same information it takes 12-30 seconds to return.  I go into query history and the queries power bi is sending for RLS are so long that databrikcs doesn't show me the end where the where statemet should be (and the RLS filter).  

I'm assuming RLS isn't being applied on the server level.  

Can someone tell me what is going on?  PBI documentation states that it appends a where statement when it sends the statement on.  But this doesn't appear to be happening.  Is this a bug?  Or do I need to do something special?

3 REPLIES 3

Clampazzo
New Contributor II

My main question as it seems Power BI doesn't send RLS to azure databricks for filtering.  Does anyone know how I can enable this or find a workaround?

KTheJoker
Contributor II
Contributor II

Are you trying to use Power BI RLS rules on top of DirectQuery?

Can you give an example of the rules you're trying to apply? Are they static roles, or dynamic roles based on the user's UPN/email being in the dataset?

Information is the currency of the modern world. - Shannon

Clampazzo
New Contributor II

I'm using an apps own data embedded solution for my setup.  However, to answer your question, yes I am.

My RLS is quite simple.  

[USER_ID]=int(UserPrincipalName())



Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group