This scenario describes a two-component Job that fetches master data from an MDM server, and displays the data in the log console.
Make sure the MDM server is up and running.
You have imported the MDM demo project and loaded the sample data into the data container Product by running the Job MDM_LoadAll.
Creating a Job to read master data from MDM
From the Palette, drop tMDMInput and tLogRow onto the design workspace.
Link the two components together using a Row > Main connection.
Configuring basic settings of tMDMInput to read master data from MDM
Double-click tMDMInput to open the Basic settings view.
In the Property Type list, select Built-In.
In the Schema list, select Built-In and click the [...] button next to Edit schema to open a dialog box and define the structure of the master data you want to read from the MDM server.
In this example, three columns are defined to fetch three elements from the Product entity: Name, Price, and Colors.
After you have defined the schema, click OK to close this dialog box, and then click Yes in the [Propagate] dialog box to propagate the schema changes to tLogRow.
Enter the user name and password for accessing the MDM server.
In the Entity field, enter Product between quotes.
In the Data Container field, enter Product between quotes.
Select Master from the Type list.
Define the query conditions in the Operations area.
In this example, we want to query the product data records whose names include Shirt.
Click the [+] button to add a row.
Enter Product/Name between quotes in the Xpath field.
Apart from elements defined in entities, you can query metadata elements which are also known as built-in elements. To query metadata elements from records in master database, you need to follow the format of
metadata:<timestamp|task_id>when defining the path expression to select the XML node to run the query on.
Select Contains from the Function list.
Enter Shirt between quotes in the Value field.
Configuring advanced settings of tMDMInput to read master data from MDM
In the Component view, click the Advanced settings tab.
In the Loop XPath query field, enter /Product between quotes on which the loop is based.
In the XPath query column of the Mapping table, enter the name of the XML node from which you want to collect the master data, next to the corresponding output column name.
Select the Get Nodes check box for the Colors row to retrieve the XML node together with its data.
Configuring the data display mode and executing the Job
Double-click the tLogRow component to display its Basic settings view.
In the Mode area, select Table (print values in cells of a table) for better readability of the result.
Save the Job and press F6 to run it.
The Product data records whose names include "Shirt" are displayed on the console with the values of three specified columns.