Hello
I defined a Row Filter to exclude some rows for a given user 'user@mail.com' in SQL.
Instead of providing a list of users to exclude, I would like to define my criteria on Unity Catalog groups instead of users.
Here is my current filter:
CREATE FUNCTION rd.my_schema.my_filter(filter_column INTEGER) RETURNS BOOLEAN
RETURN IF(CURRENT_USER() = 'user@mail.com', filter_column IN (15), true);
And I apply this Row Filter to 2 of my tables like so:
ALTER TABLE rd.my_schema.my_table_1 SET ROW FILTER rd.my_schema.my_filter ON (id_col);
ALTER TABLE rd.my_schema.my_table_2 SET ROW FILTER rd.my_schema.my_filter ON (id_col);
Could someone help me adapt this filter so that it only applies if the user executing the query is member of a given group (let's say it is named 'restricted_users_group') ?
Thanks