Create custom relationships between resources
In this tutorial we will create a custom relationship between two resources.
Why would I do this?
The system comes with the following out-of the-box relationships between resources.
The first column in the table represents the resource you are viewing and the subsequent columns indicate whether or not it has a default relationship configured for that target resource type. For example, from the business term page, you can relate to Analysis, Columns, Tables, and datasets.
Resource View | Analysis | Business term | Column | Dataset | Table | Data type |
---|---|---|---|---|---|---|
Analysis | No | Yes | No | Yes | Yes | No |
Business Term | Yes | No | Yes | Yes | Yes | No |
Column | No | Yes | No | No | No | No |
Dataset | Yes | Yes | No | No | Yes | No |
Data type | No | Yes | Yes (contact data.world support team for additional details) | No | No | No |
Table | Yes | Yes | Yes | Yes | No | No |
Custom resources | No | No | No | No | No | No |
Use Catalog Toolkit to add custom relationships between resources that are not related out-of-the-box. Use the following guidelines to plan custom relationships between the resources.
Identify the resources you want to relate.
Identify if the relationship is bi-directional.
Create a relationship
On the Organization profile page, go to the Overview tab or Resources tab. Click the New resource button and select Other resources.
In the Add new resource window, set the following and click Continue.
In the Title field, provide a name of the relationship you want to add.
From the Choose type section, select the Relationship option.
From the Choose one or more collections dropdown, select the Metadata profile collection.
In the Edit resource window, set the following properties and click the Save button.
Source to target label: Provide the field name. For example, belongs to.
Source to target label - Plural: Provide a plural for the field name. For example, belong to.
Target to source label: Define this value to set a bi-directional relationship between the two objects in the other. For example, contains.
Target to source label - plural: Provide the plural for the bi-directional relationship between the two objects. For example, contain.
On the relationship page that you just created, go the Related tab. Click Add related resource.
In the window that opens, on the Type tab select the resources for the relationship.
In the Related type field select the resource for which you are creating the relation. From the Relationship type field select Is a source for this relationship.
Next, add the second resource in the Related type field and set the Relationship type field as Is a target of this relationship.
Publish the changes
See: Publishing changes.
View the results
In the Catalog Sandbox organization, find any resource for which you enabled the custom relationships.
Check if you can relate the resources. If you enabled bi-directional relationships, you will be able to relate the resources from both the resource pages.