Forum Discussion

Jacob_'s avatar
Jacob_
Frequent Visitor
5 years ago
Solved

RLS based on many columns

hello there,   let's say that I have two below tables (employee & related fact table): keeping the structure of the model I need to create RLS role that allow me to filter data for each empl...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Jacob_ ,

     

    Add a level column for employee and level role for RLS.

    - employee1 and employee2 belong to level1, the column value =1.

    - employee3 and employee4 belong to level2, the column value =2.

    - employee5, employee6 and employee7 belong to level3, the column value =3.

    The formula for RLS should be 'employee = employee || level < level'.

     

    Best Regards,

    Jay