Provide information described in this procedure to create relationships for your model.
The Relationships tab allows you to configure how relationships are created between source and target entities. These relationships represent the connection between two entities (for example, John knows Mary).
- Click Add
- Select the entity to act as a source for your relationship in the Source field.
- Click the appropriate label type for your relationship: String or Field. If string, enter the string in the text box underneath. If field, select the field you want to use to generate the label for this relationship in the drop-down box.
- Optional: To allow a relationship to be created more than once between a source and target entity, click the Allow more than one relationship based on unique ID box and select the field on which to base the relationship in the drop-down box.
- Select the entity to act as a target for your relationship in the Target field.
- On the Properties tab, define which properties you want to be
included with the relationship you are creating.
For example, if you are creating a relationship called "treated" between an entity type of "doctor" and an entity type of "patient," you might want to choose date and diagnosis as properties. You can select Input or Metadata, depending on what you want to use to define the properties. If your model does not contain metadata, that option will be disabled.
Option Description Input The grid is populated with input fields, which are shown in the Field column; there is one row for each input field. Select the fields you want to be included as properties for the relationship by checking the Include box for that field. The Name column represents the name you want to property to have in the model; it defaults to the input field name, but you can select from any property in the Name drop-down or manually enter a name. Metadata The grid is populated with properties from the metadata, which are shown in the Name column; there is one row for each property. The properties shown are determined by whether you are defining a known relationship. If it is a known relationship, the Name column will include properties specific to that relationship; if it is not known, the Name column will include a list of all properties in the model. Select the properties you want to populate for the relationship by checking the Include box for that property. The Field column contains names of input fields you can map properties to and whose data can be used to populate properties. If an input field matches the property name, it will automatically be mapped and the Include box will be checked. - Optional: Click Add to a add a new condition.
On the Conditions tab, specify conditions that control when a relationship is created between a source and target entity.
- If you are creating the first condition, the Logical operator field will be grayed out. If you are creating a subsequent condition, specify whether this condition should be used in conjunction with previous conditions or if it should be used instead of previous conditions.
- Select the element on which the condition will be based in the Data source field.
- Select the field that the condition will be based in the Field name field.
- Select the operator for the condition in the Operator field.
- Enter the value for the condition in the Value field and click Add.
- Repeat steps 7.a through 7.e to add additional conditions.
- When you are done adding conditions, click Close.
Completing this step displays the Add Condition dialog. - Click the Updates tab.
-
Select the appropriate action for updating and overwriting properties.
After an relationship is created it can be updated over time when data with the same source and target ID is input into the Write to Model stage. This selection determines how Write to Model to manages updates.
Option Description Always update properties Properties are always updated with the most recent information. This includes updating with null or empty strings. Update properties unless all input is null Properties are always updated unless all input fields associated with the selected properties are null. Never overwrite properties with empty data Properties are always updated unless the input is a null or empty string. Never overwrite non-empty properties Properties are never updated once populated with non-empty data. - Click Add.
- Repeat steps 1 through 10 to add additional relationships.
- When you are done adding relationships, click Close.