Context sets let you organize semantic information and data asset references into bounded containers that ground AI agents. In Knowledge Studio, you can create, view, update, and delete context sets, and configure access control for each container.
You must configure a context set before you run an enrichment task to generate metadata proposals. You can create a context set as a standalone container or during enrichment task setup. For more information, see Context sets overview and Create enrichment tasks.
Before you begin
Before you manage context sets, make sure that you have the required Identity and Access Management (IAM) roles.
Required roles
To get the permissions that you need to create and manage context sets and their entries, ask your administrator to grant you the following IAM roles on the project (for creating or listing context sets) or the context set:
-
To create and list context sets in a project:
Dataplex Content Creator (
roles/dataplex.contentCreator) -
To view a known context set without reading its entries, or to include it in search results when paired with
dataplex.projects.search(such as Dataplex Catalog Viewer (roles/dataplex.catalogViewer)): Dataplex Content Viewer (roles/dataplex.contentViewer) -
To view entries and propose changes in a context set:
Dataplex Content User (
roles/dataplex.contentUser) -
To create, update, delete, and link entries in a context set:
Dataplex Content Editor (
roles/dataplex.contentEditor) -
To manage IAM permissions on or delete a context set:
Dataplex Content Admin (
roles/dataplex.contentAdmin)
For more information about granting roles, see Manage access to projects, folders, and organizations.
These predefined roles contain the permissions required to create and manage context sets and their entries. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to create and manage context sets and their entries:
-
Create context sets:
dataplex.entryGroups.createContextSet -
List context sets:
dataplex.entryGroups.list -
Search context sets:
dataplex.projects.search -
View context set details:
dataplex.entryGroups.getContextSet -
Update context sets:
dataplex.entryGroups.updateContextSet -
Delete context sets:
dataplex.entryGroups.deleteContextSet -
Propose changes to context sets:
dataplex.entryGroups.requestContextChanges -
Manage context set IAM policies:
-
dataplex.entryGroups.getIamPolicy -
dataplex.entryGroups.setIamPolicy
-
-
Create, view, list, update, and delete entries in a context set:
-
dataplex.entries.createContext -
dataplex.entries.getContext -
dataplex.entries.listContext -
dataplex.entries.updateContext -
dataplex.entries.deleteContext
-
-
Link catalog assets on context set entries:
-
dataplex.entryLinks.create -
dataplex.entries.link -
dataplex.entryGroups.useReferenceEntryLink
-
You might also be able to get these permissions with custom roles or other predefined roles.
When you create a context set, Knowledge Catalog (formerly Dataplex Universal Catalog)
automatically grants you the Dataplex Content Admin
(roles/dataplex.contentAdmin) role on that context set.
Create a context set
To create a context set to store your curated or enriched metadata, follow these steps:
Knowledge Studio
In the Google Cloud console, go to the Knowledge Studio page.
In the navigation pane, select Context sets.
On the Context sets page, click Create context set.
In the Create context set pane, enter a descriptive name in the Display name field and a unique identifier in the Context set ID field (or keep the auto-generated ID). The context set ID becomes the entry group resource ID in the API and can't be changed after creation.
In the Region menu, select a Google Cloud location for the context set:
- Regional (for example,
us-central1): Recommended when all enriched assets reside in a single region. - Multi-region (for example,
usoreu): Lets the context set span assets located across multiple single regions within that geographic boundary. - Global (
global): Lets the context set reference assets across any region.
- Regional (for example,
Optional: Enter a Description summarizing the business domain and purpose of the context set, and click Add label to attach key-value labels.
Click Create.
Metadata types
In the Google Cloud console, go to the Metadata types page.
Click Entry groups > Context set.
On the Metadata types page, click Create.
In the Create context set pane, enter a descriptive name in the Display name field and a unique identifier in the Context set ID field (or keep the auto-generated ID). The context set ID becomes the entry group resource ID in the API and can't be changed after creation.
In the Region menu, select a Google Cloud location for the context set:
- Regional (for example,
us-central1): Recommended when all enriched assets reside in a single region. - Multi-region (for example,
usoreu): Lets the context set span assets located across multiple single regions within that geographic boundary. - Global (
global): Lets the context set reference assets across any region.
- Regional (for example,
Optional: Enter a Description summarizing the business domain and purpose of the context set, and click Add label to attach key-value labels.
Click Create.
After you create the context set, you can select it as the target for an enrichment task. The enrichment run populates the container with proposed metadata documents, concepts, and data asset entries. For more information, see About enrichment tasks.
View context sets
To view existing context sets, follow these steps:
Knowledge Studio
In the Google Cloud console, go to the Knowledge Studio page.
In the navigation pane, select Context sets to view the context sets in the selected project.
To view the details of a specific context set, click its name in the list.
Metadata types
In the Google Cloud console, go to the Metadata types page.
Click Entry groups > Context set.
Optional: Turn on the Show from all projects toggle to browse context sets that you have permission to view across all Google Cloud projects.
To view the details of a specific context set, click its name in the list.
The context set details page includes the following sections and controls:
- Container metadata: Displays the context set's description, location, project ID, creation and modification timestamps, and labels.
- Top action bar: Provides buttons to manage the context set (Edit, Delete, and Permissions).
- Entries table: Lists the entries stored in the context set, including each entry's Name, Description, Entry type, Created Date, and Linked assets.
Edit a context set
Using the Google Cloud console, you can edit the container properties of a context set, which include its Display name, Description, and Labels.
To update the metadata entries inside a context set, run an enrichment task targeting that context set and approve the generated change proposals. For more information about approving change proposals, see Evaluate and approve enrichment proposals.
To edit the properties of a context set, follow these steps:
Knowledge Studio
In the Google Cloud console, go to the Knowledge Studio page.
In the navigation pane, select Context sets.
Click the name of the context set that you want to edit, and then click Edit on the details page. Alternatively, select the checkbox next to the context set in the list and click Edit in the top action bar, or click More options > Edit in the row.
Modify the editable fields (Display name, Description, or Labels), and then click Save.
Metadata types
In the Google Cloud console, go to the Metadata types page.
Click Entry groups > Context set.
Click the name of the context set that you want to edit, and then click Edit on the details page.
Modify the editable fields (Display name, Description, or Labels), and then click Save.
Delete a context set
Deleting a context set removes its entries and semantic associations from the data context graph. The console doesn't display a warning if you delete a context set that is referenced by an existing enrichment task. If you delete a context set while an enrichment run is active, the run fails to save its proposed metadata at completion because the target destination is no longer available. Subsequent runs of the enrichment task also fail after running until you recreate the context set or create a new enrichment task targeting a valid context set.
To delete a context set, follow these steps:
Knowledge Studio
In the Google Cloud console, go to the Knowledge Studio page.
In the navigation pane, select Context sets.
Click the name of the context set that you want to delete, and then click Delete on the details page. Alternatively, select the checkbox next to the context set in the list and click Delete in the top action bar, or click More options > Delete in the row.
Confirm the deletion.
Metadata types
In the Google Cloud console, go to the Metadata types page.
Click Entry groups > Context set.
Click the name of the context set that you want to delete, and then click Delete on the details page.
Confirm the deletion.
Limitations
For information about limitations that apply during Preview, see the Preview scope and boundaries section in Context sets overview.
What's next
For more information, see the following resources:
- Configure prerequisites for enrichment tasks
- Create enrichment tasks
- Evaluate and approve enrichment proposals