In this scenario, a four-component Job is used to exchange the event information about a product record. Using an established MDM connection from the Repository, this Job is triggered by Talend Studio once you have updated a product record.
To replicate this scenario, accomplish the following tasks sequentially:
Create an MDM connection of the Receive type in the Repository of the Studio. This connection is to the MDM hub holding the record you want to update.
Create the Job receiving and sending the MDM update message.
Generate the process invoking this Job created.
Update a specific MDM record.
To create the MDM records, model and container used in this scenario, you can execute the Jobs in the MDM demo project in Talend Studio and then update the MDM server to deploy the objects thus created for them to be taken into account at runtime. You will use this server all through this scenario.
For further information about how to import a demo project, see Talend Studio User Guide.
For further information about how to update the server for deploying objects, see Talend Studio User Guide.
For further information about an MDM event and the event management, see Talend Studio User Guide.
Establishing the connection
Launch the MDM server with which you need to communicate the update message.
In the Integration perspective of Talend Studio, expand the Metadata node in the Repository.
Right-click the Talend MDM item and select Create MDM connection.
Enter the Name you want to use for this connection and if required, added the Purpose and the Description in the corresponding fields. For example, we name this connection as receive_update.
In the Next step, enter the authentication information used to connect to the MDM web service through which you manage the record to be updated.
Once you click the Check button and the connection is shown successful, the Next button becomes clickable.
In the Next step, select the Data model and the Data Container used by the record to be updated. In this scenario, the model and the container are both Product.
Click Finish to validate the creation. The connection created appears under the Metadata node in the Repository.
Right-click the connection created and from the contextual menu, select Retrieve entities. Then the wizard appears.
Select Receive MDM and click Next to continue.
Select the entity to be retrieved. In this scenario, it is Product. Then the name field is entered automatically.
In the Next step, drop the elements you need to retrieve from the Source Schema area to the Target Schema area. In this scenario, the Features element is the loop and the Id, the Name and the Description elements are the fields to extract.
In the Next step, if required, change the description of the schema retrieved; otherwise, click Finish to finalize retrieving this entity. In this scenario, we keep the default schema description and click Finish.
The schema of the product entity is retrieved. For further information about the container and the data model used by Talend MDM, see Talend Studio User Guide.
Linking the components
In the Integration perspective of Talend Studio, select Create Job from the Job Design node in the Repository tree view. Then the [New Job] wizard appears.
Name this new Job and click Finish to close the wizard and validate the creation. An empty Job is opened on the workspace of the Studio.
Drop tMDMTriggerInput, tXMLMap, tMDMTriggerOutput and tLogRow from Palette onto the workspace.
Right-click tMDMTriggerInput and from the contextual menu, select the Row > Main link to connect it to tXMLMap.
Do the same to connect tXMLMap to tMDMTriggerOutput. When doing so, a dialog box appears to prompt you to name this link created.
Double-click tMDMTriggerOutput to open its Component view.
Click Edit schema to open the editor.
Select the single pre-defined column of tMDMTriggerOutput, then, click to reproduce this column on the input side (left).
Configuring the transformation of the MDM message
Double-click tXMLMap to open its editor.
In the table representing the input flow (up-left of the editor), right-click the column name MDM_Message on the top of the XML tree and select Import from repository. The [Metadata] wizard appears.
Select the entity schema retrieved earlier using the Receive MDM model, then click OK. In this scenario, the entity schema is ProductReceive.
A dialog box appears prompting you to add the schema of the Update Report to the input XML tree. Click OK to accept it. This builds a complete input document for an MDM event. In the input XML tree, the Features element is set as loop element automatically.
In the table representing the output flow (up-right of the editor), develop the output XML tree as presented in the figure below. This tree is constructed depending on the required static model of the MDM output report.