Forum Discussion
Why applying RLS causes problem to my model?
RLS is applied along the arrows. So in your example it is only affecting learners_by_month but is ineffective for paths and courses.
In addition your data model introduces ambiguities between the right three tables. Stick with a star schema and avoid bidirectional joins.
But there is a bi-directional relationship between learners_by_month and paths, as well as between learners_by_month and courses, so RLS is applied to those tables as well, right?
And yes, I know that it is preferable to have a star schema but I can't in my example, I need a filter on one of the 3 tables to be effective on the two others.
- lbendlin1 year agoSuper User
Another - less preferred - option is to apply the RLS rules to all dimension tables.
- Cyprien_Bariant1 year agoNew Member
This solution will result in the same problem as learners_by_month will still be the only fact table to be filtered by the RLS.
In any case, the main thing I would like to figure out is "why" it doesn't work as expected
- lbendlin1 year agoSuper User
But there is a bi-directional relationship between learners_by_month and paths, as well as between learners_by_month and courses, so RLS is applied to those tables as well, right?not by default. You need to explicity request the security context to be passed bidirectional as well.