Support Questions

Find answers, ask questions, and share your expertise

Ranger Row Level Filtering

avatar
New Contributor

Hi Gurus,

Can you please validate the expected behaviour of Ranger:

I have a simple table userz with three columns: id, first_name, country.

I have two groups Grp_A, Grp_B and one user User_AB who is a member of both Grp_A and Grp_B.

I have a Row Level Filter Policy on the the userz table with two Row Filter Conditons:

1. Select Group = Grp_A, Access Type = Select, Row Level Filter = (country = 'US')

2. Select Group = Grp_B, Access Type = Select, Row Level Filter = (country = 'Canada')

When I log into hive and do a select * from the userz table my expectation is that I will see rows where country is either US or Canada. However, only the rows of the Row Filter Condition that appears first is returned that is, if Row Level Filter = (country = 'US') is first then US rows are returned and if Row Level Filter = (country = 'Canada') is first only the Canada rows is returned.

Is this the expected behaviour?

Regards,

Mex

42624-table.png

1 ACCEPTED SOLUTION

avatar
Contributor

Yes, this is expected behavior. Ranger matches first row-filter policy line-item (in the same order as specified in the policy).

View solution in original post

2 REPLIES 2

avatar
Contributor

Yes, this is expected behavior. Ranger matches first row-filter policy line-item (in the same order as specified in the policy).

avatar
New Contributor

Thanks for the confirmation.