Talend Studio allows you to customize the display format of the foreign key information whenever it is available in Talend MDM Web UI to improve its readability. By default, the elements in the foreign key information are displayed by being concatenated together with a ' - '.
Before you begin
You have already created data models, business entities and attributes in the data model. For further information, see Creating a data model, Creating business entities in a data model and Adding attributes to the business entity.
About this task
The following scenario assumes that you have already imported the MDM Demo project and you want to customize the display format of the foreign key information (ProductFamily) in Talend MDM Web UI. The Product data model holds the following entities: Product, ProductFamily and Store. The Product entity holds a foreign key element Family which is linked to the ProductFamily entity. By default, one example of the foreign key information is displayed as 1-Literature.
To set the foreign key infos, do the following:
- In the data model editor, expand the Product entity and then browse to the Family attribute.
Right-click Family and then select Set the
foreign key infos.
A dialog box pops up.
In the Set the Foreign Key Infos dialog box, click the
[...] button to open the dialog box which allows you
to select the element to be used for customizing the display format of the
foreign key information.
- Click Add to add the element and close the dialog box.
- In the Set the Foreign Key Infos dialog box, click the [+] button to add the selected element to the xPaths area.
In the Format area, enter the expression to customize
the format you want to use to display the foreign key information in Talend MDM Web UI.
In this example, enter the following:
"ID: "+ ProductFamily/Id + " && Name: " + ProductFamily/Name.
Click OK to close the Set the Foreign Key
Infos dialog box.
The newly defined foreign key information is displayed under the Annotations node of the Family element.
- Press Ctrl + S on your keyboard to save your modifications.
Deploy the data model to the MDM server to validate your changes. For more
information about how to deploy items to the MDM server, see Deploying repository items to the MDM Server.
Now the foreign key information will be displayed in the customized format whenever it is available in Talend MDM Web UI.