Skip to main content

Privacera Documentation

With default Value - GET_UG_ATTR_Q(‘attribute_key’,‘default_value’)

Description: returns the list of attributes mapped to the user groups (with each attribute name in single quotes) to which the querying user is a member. If the groups mapped to the user does not have an attribute‘attribute_key’ or if the user is not mapped to any group, ‘default_value’ will be returned. Can be used for comparison of character values.


  • The user joe is a member of the groupsadmin(attribute: access=auditor) andmanager (attribute: location=NY, access=admin). GET_UG_ATTR_Q(‘location’,‘none’) will return‘mumbai’.

  • The user is a member of groups admin and manager (both the groups don’t have any attributes),GET_UG_ATTR_Q(‘location’,‘none’) will return‘none’.

  • The user is not a member of any group,GET_UG_ATTR_Q(‘location’,‘none’) will return‘none’.

Usage: can be used in:

  • Row Level Filter Policies - row level filters expressions

  • Example:location in (${{GET_UG_ATTR_Q(‘location’,‘none’)}})

  • Masking policy - Custom masking condition

  • Example:CASE WHEN location in (${{GET_UG_ATTR_Q(‘location’,‘none’)}}) THEN {col} ELSE 'none' END

  • Policy condition

  • Example:GET_UG_ATTR_Q('location',’NY’)==’\'mumbai\’'