Entry link types let you define custom relationship models, directional rules, and validation constraints between entries in Knowledge Catalog. This document describes how to create, list, update, and delete custom entry link types, or view built-in system link types.
To connect existing data entries using these types, see Create and manage entry links.
For more information about entry link type concepts, see About entry link types and entry links.
Before you begin
Before you create and manage custom entry link types, do the following:
- Make sure you have the required roles on the project. For details, see the Required roles section of this document.
- Set up REST authentication. For details, see the Set up REST authentication section of this document.
Required roles
To get the permissions that you need to create and manage entry link types, ask your administrator to grant you the following IAM roles on the project:
-
Create, update, and delete custom entry link types:
Dataplex Entry Link Type Owner (
roles/dataplex.entryLinkTypeOwner) -
Specify required aspect types (
requiredAspects) when creating an entry link type: Dataplex Aspect Type User (roles/dataplex.aspectTypeUser) -
View and list entry link types:
Dataplex Catalog Viewer (
roles/dataplex.catalogViewer)
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 entry link types. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to create and manage entry link types:
-
Create custom entry link types:
-
dataplex.entryLinkTypes.createon the project -
dataplex.aspectTypes.useon the aspect types specified in requiredAspects
-
-
Update mutable fields (displayName, description, labels, allowedTypes):
dataplex.entryLinkTypes.updateon the entry link type -
Delete custom entry link types:
dataplex.entryLinkTypes.deleteon the entry link type -
View entry link types:
dataplex.entryLinkTypes.geton the entry link type -
List entry link types:
dataplex.entryLinkTypes.liston the project
You might also be able to get these permissions with custom roles or other predefined roles.
Set up REST authentication
To simplify calling the Knowledge Catalog REST API, define an alias for
curl that includes your authorization token and sets the request header to
JSON:
alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'
Create a custom entry link type
You can create custom entry link types to define asymmetric directional or symmetric (non-directional) relationships between metadata entries.
Creating, updating, or deleting an entry link type initiates a long-running operation (LRO). The operation must succeed before changes are reflected in the entry link type.
Create an asymmetric (directional) entry link type
Use directional entry link types when relationships have distinct source and target roles. For example, a table depending on an upstream dataset, or a business term defining a physical table.
gcurl -X POST "https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/entryLinkTypes?entryLinkTypeId=ENTRY_LINK_TYPE_ID" \
-d '{
"displayName": "DISPLAY_NAME",
"description": "DESCRIPTION",
"directed": {
"source": {
"allowedTypes": {
"names": [
"projects/PROJECT_ID/locations/LOCATION_ID/entryTypes/SOURCE_ENTRY_TYPE_ID"
]
},
"disableAuthorizedRetrieval": true
},
"target": {
"allowedTypes": {
"names": [
"projects/PROJECT_ID/locations/LOCATION_ID/entryTypes/TARGET_ENTRY_TYPE_ID"
]
},
"disablePermissionCheck": true,
"disableAuthorizedRetrieval": false
}
},
"labels": {
"environment": "production"
}
}'
Replace the following:
- PROJECT_ID: the project ID where the entry link type is created.
- LOCATION_ID: the location ID where the entry link
type is created (for example,
us-central1orglobal). - ENTRY_LINK_TYPE_ID: a unique identifier for the entry link type.
- DISPLAY_NAME: a human-readable display name for the entry link type (up to 256 characters).
- DESCRIPTION: a description explaining the purpose of the entry link type (up to 1,024 characters).
- SOURCE_ENTRY_TYPE_ID: the entry type ID allowed as the source entry in the link.
- TARGET_ENTRY_TYPE_ID: the entry type ID allowed as the target entry in the link.
Configuration notes
When configuring the source and target specifications, consider the following settings:
Entry type restrictions (
allowedTypes). You must either setallowAllTypestotrueto permit all entry types or specify one or more entry types inallowedTypes.Creation permission bypass (
disablePermissionCheck). Set totrueto let users create links to an entry even if they lackwritepermissions on it. This setting is useful for upstream dependency links where users need to link to datasets they don't own.Lookup retrieval bypass (
disableAuthorizedRetrieval).Set to
trueto bypass sourcereadpermission checks during link lookups.Set to
false(default) to enforcereadauthorization on traversal. If users lackreadpermissions on the opposite linked entry, unauthorized entry names and non-empty paths are redacted to*, and attached aspect data is omitted.
Create a symmetric (non-directional) entry link type
Use symmetric (non-directional) entry link types when the relationship between entries is bidirectional. For example, related datasets, peers, or cross-referenced assets.
gcurl -X POST "https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/entryLinkTypes?entryLinkTypeId=ENTRY_LINK_TYPE_ID" \
-d '{
"displayName": "DISPLAY_NAME",
"description": "DESCRIPTION",
"undirected": {
"entries": {
"allowedTypes": {
"names": [
"projects/PROJECT_ID/locations/LOCATION_ID/entryTypes/ENTRY_TYPE_ID"
]
},
"disablePermissionCheck": false,
"disableAuthorizedRetrieval": false
}
},
"labels": {
"team": "analytics"
}
}'
Replace the following:
- PROJECT_ID: the project ID where the entry link type is created.
- LOCATION_ID: the location ID where the entry link
type is created (for example,
us-central1orglobal). - ENTRY_LINK_TYPE_ID: a unique identifier for the custom entry link type.
- DISPLAY_NAME: a human-readable display name for the entry link type (up to 256 characters).
- DESCRIPTION: a description explaining the purpose of the entry link type (up to 1,024 characters).
- ENTRY_TYPE_ID: the ID of the entry type allowed in the link.
Create an entry link type with required aspects
You can enforce mandatory aspect metadata whenever an entry link of this type is instantiated. Defining required aspects prevents invalid relationships, ensuring governance across teams.
gcurl -X POST "https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/entryLinkTypes?entryLinkTypeId=ENTRY_LINK_TYPE_ID" \
-d '{
"displayName": "DISPLAY_NAME",
"description": "DESCRIPTION",
"directed": {
"source": {
"allowAllTypes": true
},
"target": {
"allowAllTypes": true
}
},
"requiredAspects": [
{
"type": "projects/dataplex-types/locations/global/aspectTypes/ASPECT_TYPE_ID"
}
]
}'
Replace the following:
- PROJECT_ID: the project ID where the entry link type is created.
- LOCATION_ID: the location ID where the entry link
type is created (for example,
us-central1orglobal). - ENTRY_LINK_TYPE_ID: a unique identifier for the entry link type.
- DISPLAY_NAME: a human-readable display name for the entry link type (up to 256 characters).
- DESCRIPTION: a description explaining the purpose of the entry link type (up to 1,024 characters).
- ASPECT_TYPE_ID: the aspect type ID required for the entry link.
Aspect requirements and constraints
When configuring requiredAspects, consider the following:
System aspect types only. Only system aspect types (located under
projects/dataplex-types/locations/global/aspectTypes/...) can be configured as required aspects on entry link types. Custom aspect types aren't supported.Immutability. Once an entry link type is created, its
requiredAspectsconfiguration is immutable, and can't be updated or removed.
Get an entry link type
Retrieve full configuration details of a specific entry link type.
gcurl -X GET "https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/entryLinkTypes/ENTRY_LINK_TYPE_ID"
Replace the following:
- PROJECT_ID: the project ID where the entry link type is created.
- LOCATION_ID: the location ID where the entry link
type is created (for example,
us-central1orglobal). - ENTRY_LINK_TYPE_ID: the unique identifier for the entry link type.
List entry link types
List entry link types within a project and location.
gcurl -X GET "https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/entryLinkTypes?pageSize=PAGE_SIZE"
Replace the following:
- PROJECT_ID: the project ID of your Google Cloud
project. To list system entry link types, specify
dataplex-types. - LOCATION_ID: the location ID (for example,
us-central1orglobal). To list system entry link types, specifyglobal. - PAGE_SIZE: the maximum number of entry link types to return.
Update a custom entry link type
You can update only displayName, description, allowedTypes, and
labels after you create a custom entry link type. You can also update
allowedTypes incrementally to add new entry types to the allowed list. You
can't modify the directionality (directed or undirected) and
requiredAspects after you create a resource.
gcurl -X PATCH "https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/entryLinkTypes/ENTRY_LINK_TYPE_ID?updateMask=displayName,description,labels" \
-d '{
"displayName": "NEW_DISPLAY_NAME",
"description": "NEW_DESCRIPTION",
"labels": {
"LABEL_KEY_1": "LABEL_VALUE_1",
"LABEL_KEY_2": "LABEL_VALUE_2"
}
}'
Replace the following:
- PROJECT_ID: the project ID where the entry link type was created.
- LOCATION_ID: the location ID where the entry link
type was created (for example,
us-central1orglobal). - ENTRY_LINK_TYPE_ID: the unique identifier for the entry link type that you want to update.
- NEW_DISPLAY_NAME: the updated human-readable display name for the entry link type.
- NEW_DESCRIPTION: the updated description explaining the purpose of the entry link type.
- LABEL_KEY_1, LABEL_VALUE_1,
LABEL_KEY_2, LABEL_VALUE_2:
the keys and values for the labels you want to assign or update
(for example,
tier:gold,status:active).
Delete a custom entry link type
You can't delete system entry link types (for example, synonym, related,
definition, and schema-join) residing in
projects/dataplex-types/locations/global/.
To delete a custom entry link type, send a DELETE request:
gcurl -X DELETE "https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/entryLinkTypes/ENTRY_LINK_TYPE_ID"
Replace the following:
- PROJECT_ID: the project ID where the entry link type was created.
- LOCATION_ID: the location ID where the entry link
type was created (for example,
us-central1orglobal). - ENTRY_LINK_TYPE_ID: the unique identifier of the entry link type that you want to delete.
What's next
- See About entry link types and entry links.
- See Create and manage entry links.
- To link glossary terms without creating custom entry link types, see Manage synonyms and related terms.