User attributes

Assign key/value attributes to users and teams to drive row-access filters and personalize what each person sees.

User attributes are key/value pairs you assign to people (or teams) and reference in your semantic model. They are how you personalize query results — for example, restricting a user to their own region. Managing attributes is admin-only.

#Subjects, keys, and values

Each attribute assignment has:

  • a subject — either a user or a team;
  • a key — the attribute name, such as region or department;
  • a value — the string assigned to that subject for that key.

An admin sets, lists, and deletes attribute values per subject. Assign an attribute to a team to apply it to everyone on that team without setting it person by person.

#Powering row-access filters

Attributes become useful when a row-access filter in your model references them. At query time, Flax substitutes the caller's attribute value into the filter, so the same model returns a different, correctly scoped result set for each person.

# Illustrative: a row-access filter referencing a user attribute
row_filter: "region = '{{ user_attributes.region }}'"

A viewer with region = EMEA then sees only EMEA rows, while a viewer with region = APAC sees only APAC rows — from the same dashboard.

Tip

Keep attribute keys consistent with the values your warehouse actually stores (matching case and spelling), so filters compare cleanly.