Support Questions

Find answers, ask questions, and share your expertise

How to set up Ranger policy for an array struct in hive table


Hello All,

I need to set up a Ranger policy to restrict a user to access certain array struct from a column in HIVE table.

For example, I have a column called 'Spouse' in a Hive table which contains array structs such as spousefirstname, spouselastname, spousebirthdate, spousessn, spouseaddress, spousebirthplace.

I need to restrict a user to access arrays structs - spousessn and spouseaddress.

How can I set up a Ranger policy to restrict only those two arrays structs in column 'Spouse'?

HDP version - 2.6.3

Hive version - 1.2.1

Ranger version - 0.7.0


New Contributor

You can change hive code where you need to identify typeInfo object and create individual column names for the nested column and add those to ColumnAccessInfo.add();

It will pass the entire struct columns and you can apply policy on that.