Relation Templates Use Case
When configuring multiple Sources within DataForge, it is common for repeated patterns of Relation logic to be created across multiple Sources. For example, imagine a "Master Data Product" Source that contains information about every product an organization sells. The "Master Data Product" source has Relations to multiple Sales Sources, all with the Relation Expression "[This].productID = [Related].ProductID"
Master Data Products Relations
In the event that the user needs to change the Relation expression, they unfortunately will need to edit the expression in three separate places, one for each Source. This process is time consuming and prone to user error. The user needs the ability to manage the expression for all three Sales Sources in one place. In DataForge, this functionality exists as a Relation Template.
Relation Templates also have an additional usage when using the Clone functionality. Check out the examples here to see how they can be used to control logic in the Cloning process.
Managing Templates
Selecting Templates -> Relation Templates from the main menu opens the Relation Templates list view:
Relation Template List
Creating New Relation Template
Clicking NEW + button opens new template Setting tab:
New relation template
Enter a template name and optional description for the Relation Template.
Start by selecting a Test Source to use for validating the relation template being created. This does not need to be the only source the relation template is applied to.
Note: the source you selected will be used for template validation only and will not be saved
Once the test source is selected, the system will prompt you to select the Related Source:
Related Source selection
Related source name defines [Related] source container for the relation expression. Any sources that appears greyed out and unselectable in the Related Source drop-down indicates that source is templated. To create a Relation Template pointed to a Source Template, the Related Source Type option above the drop-down needs to be changed to Source Template.
After selected the Related Source, finalize the relation template settings by entering the relation template expression and clicking the Test button to confirm the relation expression is valid. After testing the expression, click the Save button. The Save button will not be selectable until the Relation Template has successfully run a Test.
Linking (applying) the template to sources
Relation Templates are applied to sources in the Linked Sources tab within the template.
To link the Template to source(s), click NEW + button and select the checkbox next to one or more sources in the modal and select the Validate button.
DataForge creates Relation objects based on the Template and validates them for each of the selected sources. Results of the validation are summarized on the next modal view.
Relation Template Validation Dialog
Sources with green status successfully passed validation. Sources with a red status icon have failed and require the user to correct configurations before the template can be applied. Clicking the red status icon displays the validation error details to help troubleshoot.
Once errors are corrected, click RE-VALIDATE or remove the failed sources from the template linking modal. Once validation has passed, SAVE button is enabled. Saved linked sources appear on Linked Sources tab.
Updated