Scenario: Loading records into a business entity - 6.3

Talend Open Studio for Big Data Components Reference Guide

Talend Open Studio for Big Data
Data Governance
Data Quality and Preparation
Design and Development
Talend Studio

This scenario describes a Job that loads records into the ProductFamily business entity defined by a specific data model in the MDM hub.


  • The Product data container: This data container is used to separate the product master data domain from the other master data domains.

  • The Product data model: This data model is used to define the attributes, validation rules, user access rights and relationships of the entities of interest. Thus it defines the attributes of the ProductFamily business entity.

  • The ProductFamily business entity: This business entity contains Id, Name, both defined by the Product data model.

For further information about how to create a data container, a data model, and a business entity along with its attributes, see the MDM part of your Talend StudioMDM Studio User Guide.

The Job in this scenario uses three components.

  • tFixedFlowInput: This component generates the records to be loaded into the ProductFamily business entity. In a real-life project, your records to be loaded are often voluminous and stored in a specific file. However, to simplify the replication of this scenario, this Job uses tFixedFlowInput to generate four sample records.

  • tWriteXMLField: This component transforms the incoming data into XML structure.

  • tMDMBulkLoad: This component writes the incoming data into the ProductFamily business entity in bulk mode, generating ID value for each of the record data.

Dropping and linking components

  1. Drop tFixedFlowInput, tWriteXMLField and tMDMBulkLoad onto the design workspace.

  2. Connect tFixedFlowInput to tWriteXMLField using the Main link.

  3. Do the same to connect tWriteXMLField to tMDMBulkLoad.

Configuring the components

Generating the data records to be loaded into a business entity

  1. Double click tFixedFlowInput to open its Basic settings view.

  2. Click the [...] button next to Edit schema to open the schema editor.

  3. In the schema editor, click the [+] button to add one row.

  4. Name the new column, family in this example.

  5. Click OK to close the schema editor.

  6. In the Mode area of the Basic settings view, select the Use Inline Table option.

  7. Click the [+] button four times to add four rows in the table.

  8. In the inline table, click each of the added rows and then enter their names between quotes: Shirts, Hats, Pets, and Mugs.

Transforming the incoming data into XML structure

  1. Double-click tWriteXMLField to open its Basic settings view.

  2. Click the [...] button next to the Edit schema field to open the schema editor and then add a row by clicking the [+] button.

  3. Click the newly added row to the right view of the schema editor and enter the name of the output column where you want to write the XML content. It is xmlRecord in this example.

  4. Click OK to validate this output schema and close the schema editor.

    In the dialog box that pops up, click OK to propagate this schema to the following component.

  5. In the Basic settings view, click the [...] button next to Configure XML Tree to open the dialog box where you can create the XML structure.

  6. In the Link Target area, click rootTag and rename it to ProductFamily, which is the name of the business entity used in this scenario.

  7. In the Linker source area, drop family to ProductFamily in the Link target area.

    A dialog box pops up, asking you to select one operation.

    Select Create as sub-element of target node to create a sub-element of the ProductFamily node. Then, the family element appears under the ProductFamily node.

    Right-click the Name node and select from the contextual menu Set As Loop Element.

  8. In the Link target area, click the family node and rename it to Name, which is one of the attributes of the ProductFamily business entity.

    Click OK to validate the XML structure you defined.

Writing the incoming data into a business entity

  1. Double-click tMDMBulkLoad to open its Basic settings view.

  2. Select xmlRecord from the XML Field drop-down list.

  3. In the URL field, enter the bulk loader URL between quotes. For example, http://localhost:8180/talendmdm/services/bulkload.

  4. In the Username and Password fields, enter your login and password to connect to the MDM server.

  5. In the Data Model and the Data Container fields, enter the names corresponding to the data model and the data container you need to use. Both are Product for this scenario.

    In the Entity field, enter the name of the business entity into which you want to load the records. In this example, enter ProductFamily.

  6. Select the Generate ID check box in order to generate ID values for the records to be loaded.

  7. In the Commit size field, type in the batch size to be written into the MDM hub in bulk mode.

Saving and executing the Job

  1. Press Ctrl+S to save your Job.

  2. Execute the Job by pressing F6 or clicking Run on the Run tab.

    Log into your Talend MDM Web User Interface to check the newly added records for the ProductFamily business entity.