Skip to main content

Relate your pipelines

Relationships define how the tables within the database relate to each other. Specifically, a relationship joins a primary key column in one table with a foreign key column in another.

Relationships can be used to link data from different tables in order to do lookups to related values. In Data Hub these relationships are called Lookup relationships. In addition relationships can be used to link data to each other in the semantic layer, to support grouping and filtering. These are discussed in relationships in Semantic Modeling and more information is also available in The complete guide to the Semantic Layer

Add a Lookup relationship

  1. On the model screen, expand the Pipelines section.

  2. Navigate to the pipeline from where you want to define a new relationship, e.g. Sales Order Lines, and click + Add Relationship

    ClickAddRelationship.png
  3. In the General area of the design panel, specify the Related pipeline that you want to relate TO, e.g. Date. The relationship name defaults to the Related pipeline name. Change the name if required.

    Relate_pipelines_SpecifyToPipeline_and_relaitonship_type.png
  4. In the Type dropdown, select Lookup

  5. In the Mappings section, some columns that are deemed a match by Data Hub may have been filled in. Verify these, or add the one's you require.

  6. Click the ellipses icon (right of the column-selection drop-down) to specify a value or parameter, if desired, or to delete the mapping.

    RelationshipElipse.png
  7. In the Operator column, specify how the condition will be evaluated.

    RelationshipOperator.png
  8. If necessary, click the Not column to negate the selection in the Operator column.

  9. On the right side of the condition specify the appropriate column, value, or parameter for the condition. On the left side, the condition is labelled as per the selected pipeline.

  10. Create any additional conditions by clicking + Condition

  11. Once all the conditions are defined, the Mappings column is updated in the RELATIONSHIPS pipeline tab.