Tags#

A tag is a label that you apply to data. Tags don’t grant or deny access on their own. Instead, policies can use tags to select the data they cover. You can also create tags and apply them to data with the Control Plane API.

Tags commonly group data by business domain, region, or sensitivity, so that one policy can cover all data in the group. For example:

  • finance, marketing, or sales for the data that a team works with, so that you can grant each team’s role access to its data

  • eu or us for data that must stay in a region

  • certified for data that is approved for reporting

  • pii for personally identifiable information, such as names and email addresses

  • confidential for data that only a few roles can access

You can tag catalogs, schemas, tables, views, materialized views, and columns. A tag on a catalog, schema, or table also applies to everything inside it.

Create a tag#

  1. In the Control Plane UI, go to Access > Tags.

  2. Click Create tag.

  3. Enter a name of up to 15 characters. Optionally, select a color and enter a description.

  4. To nest the tag under another tag, select Nested tag under: and choose the parent tag. Only one level of nesting is allowed.

  5. Click Create tag.

To change a tag’s settings, such as its description or color, open the tag’s menu and select Edit tag settings. Make your changes on the Tag settings tab, and click Save.

Nest a tag under another tag#

To organize tags in a hierarchy, nest a tag under a parent tag. Only one level of nesting is allowed, so a nested tag can’t be a parent. You can nest a tag when you create it, or later:

  1. Open the menu of the tag that you want to nest, and select Edit tag settings.

  2. Select Nested tag under:, and then choose the parent tag.

  3. Click Save.

Nested tags appear under their parent in the tag list. A nested tag’s name starts with its parent’s name. For example, if you create the tags email and phone and nest them under pii, their names are pii.email and pii.phone. In a policy, the following matching expressions select data by these tags:

  • HAS_TAG(pii.email) matches data tagged pii.email.

  • HAS_TAG(pii.*) matches data that has any tag nested under pii. It doesn’t match data tagged pii itself. To match both, use HAS_TAG(pii) OR HAS_TAG(pii.*).

Apply a tag to data#

To apply a tag:

  1. In the tag list, click Assign tag in the tag’s row.

  2. Click Apply tag.

  3. In Catalogs, select one or more catalogs.

  4. Choose where to apply the tag:

    • To tag the catalogs, select Apply tag at catalog level.

    • To tag schemas, tables, or columns, select them in the Schemas, Tables, and Columns fields. Each field appears after you select the level above it. To tag schemas or tables, select Apply tag at schema level or Apply tag at table level.

  5. Click Apply tag.

  6. Click Save.

The In-use column of the tag list shows how many catalogs, schemas, tables, and columns have each tag. To see the data that has a tag, click the number in its In-use column.

Remove a tag from data#

  1. In the tag list, click the number in the tag’s In-use column.

  2. On the Instances tab, click Remove tag next to the data.

  3. Click Save.

Delete a tag#

In the tag list, open the tag’s menu, select Delete tag, and confirm.

You can’t delete a tag that is applied to data, that a policy uses, or that has nested tags. Remove the tag from all data first. To delete a tag, you need the Create tag privilege, and a role in your active role set must own the tag.