Created 08-02-2017 01:37 PM
Hello,
When we use a Filter with Ranger on Hive tables: is it possible to define a dynamic value ?
My use case :
I have different groups on my application. Each group has at least one user.
Data could be accessed by only an appropriate group.
My SQL request : select * from table t1, table t2 where t1.id=t2.id and t2.group="group_admin".
Instead of "group_admin" I would like to put a dynamic value.
Is it possible or any suggestions ?
Thks for your helps
Created 08-04-2017 07:00 PM
@Smart Data Starting in HDP 2.6.0 you can use variables in ranger policies. So you could do a row-level filtering using where user={user}. I am not sure of the full range of variables that you can use (or if it is limited to user only) so you may want to try where group_admin={group}. [See comment for using additional variables]
Useful references:
You may also want to look at this post: https://community.hortonworks.com/articles/59582/create-dynamic-row-level-filter-in-ranger.html
Created 08-05-2017 10:46 PM
See this post for using variables other than {user}: https://community.hortonworks.com/questions/118123/hdp-26-allows-user-variable-in-ranger-policies-ar...
Created 08-07-2017 07:18 AM