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?

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())



Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!