Skip to main content

Create custom relationships between resources (CTK)

Danger

data.world University!

Check out our Creating a relationship video!

In this tutorial we will create a custom relationship between two resources.

Why would I do this?

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.

    sample_custom_relation.gif

Create a relationship

  1. On the Organization profile page, go to the Overview tab or Resources tab. Click the New button and select Catalog resource.

  2. On the Create a new resource page, in the Select type tab, select Relationship. Click the Continue to configure fields button.

    The Relationship page opens.

  3. In the Configure fields tab, set the following in the About section.

    • In the Title field, provide a name of the relationship you want to add.

    • From the Collections dropdown, select the Metadata profile collection.

  4. In the Configure fields tab, set the following in the More information section.

    • Source types: Select the source resource type for the relationship. Type is a source for this Relationship

    • Source collection types: Select the source collection type for the relationship.

    • 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 types: Select the target resource type for the relationship.

    • Target collection types: Select the target collection type for the relationship.

    • 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.

    • Filter by this relationship in search - source-to-target only: This setting allows you to use the relationship as a filter on the search results page, exclusively for source-to-target relationship displays.

      For a consistent user experience, we highly recommend you only select Filter by this relationship in search when the relationship also has a field specified in Related field - source types. Read more about the relationship as fields feature. Note: When paired with a field, the filter label will match the name of the field you see in Related field - source types (for example, Data Steward), otherwise, the filter label will be the Source to target label - Plural (the plural of the type specified as the Target type (for example, People).

      add_custom_relationship.gif
  5. Click Continue to review Relationship.

  6. In the Review Relationship tab, check the configuration details for any possible errors before saving it. If adjustments are needed, click Back to edit the configuration.

  7. Click Create Relationship. The creation page is closed and you are taken to your new Relationship page.

Publish the changes

View the results

  1. In the Catalog Sandbox organization, find any resource for which you enabled the custom relationships.

  2. 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.

    add_custom_relation3.gif