How it works
Three building blocks work together:- Tags classify your data (for example
PII,Financial,Confidential). Tags are defined once at the organization level and can be attached to any number of columns across your projects and catalogs. - Masks define how a value is transformed. You can use Peaka’s predefined masks or create your own with a SQL expression.
- Mask rules connect the two: for a given tag, a rule says which group of users sees the data through which mask.
1. Open the Tags page
Tags are managed at the organization level. In Peaka Studio’s home screen, find the ORGANIZATION section in the left sidebar and open Tags. This brings you to the Tag List page. Mask rules target user groups, which are managed on the same organization sidebar under General → Groups (Organization Settings). Create your groups — for examplesupport-team — and add members before setting up rules.
2. Pick a mask (or create a custom one)
Peaka ships with predefined masks that cover the most common cases:
If none of these fit, create a custom mask with a SQL expression — either from the Manage Custom Masks button on the Tag List page, or directly from the Mask Type dropdown’s + Custom Mask option while editing a rule. A custom mask has a Name, Description, and Expression. Use the
{col} placeholder for the column and {type} for its data type — Peaka substitutes them at query time. For example, a mask that keeps only the email domain:
3. Create a tag with mask rules
On the Tag List page click New Tag, give it a Name (for examplePII) and optionally a Description, and add rules with + New Rule. Each rule pairs a Mask Type with a Group. A typical setup:
- Group: support-team → Redact — support agents work with masked values.
- Group: contractors → Nullify — external contractors see nothing.
- Users in neither group — say, your data team — keep seeing raw values, since no rule targets them.
4. Assign the tag to columns
Tags are attached to columns inside your project. Open the table in the Data Model view and click Manage Column Tags in the table toolbar. Add a mapping with + New Column Rule, pick the Column and the Tag, and Save — for example theemail and phone columns of your CRM catalog. A column can carry one tag; the same tag can be reused across any number of tables and catalogs.
5. Verify the masking
Run a query on the tagged table as different users:
The change takes effect immediately — the next query against the tagged column is masked, with no refresh or restart needed.
Things to keep in mind
- Masking is applied by the query engine, so it also covers downstream access paths — the Query API, BI tool connections, and embedded Peaka.
- Rules are group-based. If none of the querying user’s groups has a rule for the tag, the column comes back unmasked — design your groups so that everyone who should see masked data is covered by a rule.
- Custom mask expressions run inside the query, so any Peaka SQL function is available in them.
- Masks transform values but do not remove rows. To control which rows a user can see, combine masking with row-level security.