tMDMRouteRecord - 6.1

Talend Components Reference Guide

EnrichVersion
6.1
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

tMDMRouteRecord properties

Component family

Talend MDM

 

Function

tMDMRouteRecord submits the primary key of a record stored in your MDM Hub to Event Manager in order for Event Manager to trigger the due process(es) against some specific conditions that you can define in the process or trigger pages of the MDM Studio.

For more information on Event Manager and on a MDM process, see Talend Studio User Guide.

Purpose

This component helps Event Manager identify the changes which you have made on your data so that correlative actions can be triggered.

Basic Settings

Use an existing connection

Select this check box if you want to use a configured tMDMConnection component.

 

MDM version

By default, Server 6.0 is selected. Although it is recommended to migrate existing Jobs for this new version, the Server 5.6 option is available to ease the process of the migration of your Jobs so as to keep them working without modification with a 6.0 server. To do so, an option on the server must be enabled to accept and translate requests from such Jobs.

  URL Type in the URL of the MDM server.

 

Username and Password

Type in the user authentication data for the MDM server.

To enter the password, click the [...] button next to the password field, and then in the pop-up dialog box enter the password between double quotes and click OK to save the settings.

 

Data Container

Type in the name of the data container that holds the record you want Event Manager to read.

Type

Select Master or Staging to specify the database on which the action should be performed.

 

Entity Name

Type in the name of the business entity that holds the record you want Event Manager to read.

 

IDs

Specify the primary key(s) of the record(s) you want Event Manager to read.

Advanced settings

tStatCatcher Statistics

Select this check box to gather the processing metadata at the Job level as well as at each component level.

Connections

Outgoing links (from this component to another):

Row: Iterate

Trigger: Run if; On Component Ok; On Component Error, On Subjob Ok, On Subjob Error.

Incoming links (from one component to this one):

Row: Iterate;

Trigger: Run if, On Component Ok, On Component Error, On Subjob Ok, On Subjob Error

For further information regarding connections, see Talend Studio User Guide.

Global Variables

ERROR_MESSAGE: the error message generated by the component when an error occurs. This is an After variable and it returns a string. This variable functions only if the Die on error check box is cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl + Space to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio User Guide.

Usage

Use this component as a start component. It needs an output flow.

Log4j

If you are using a subscription-based version of the Studio, the activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User Guide.

For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html.

Scenario: Routing an update report record to Event Manager

In this scenario, the tMDMRouteRecord component is used to submit the primary key of an update report record to Event Manager so that a trigger is launched to call a Job which will print out the notification that a data record had been updated.

Prerequisites

  • The MDM server is up and running.

  • The MDM demo project has already been imported.

  • The data container Product has already been populated with some data records.

For further information about how to create a data container and a data model, see your Talend Studio User Guide.

For further information about how to create a record and access its viewable attributes, see the Talend MDM Web User Interface User Guide.

Creating a Job to notify that a data record has been updated

In this scenario, a Job called message is created with only one tJava component to inform the users of the update of an existing data record.

  1. Drop a tJava component onto the design workspace.

  2. Double-click the component to display its Basic settings.

  3. In the Code field, enter System.out.println("------- A Product is Updated.--" + new java.util.Date());.

  4. Save your Job and deploy it to the MDM Server.

For further information about the tJava component, see tJava.

For further information about how to deploy a Job onto the MDM Server, see the Talend Studio User Guide.

Generating a Job Caller Trigger and deploying it to the MDM server

In this scenario, once the Job message is created, a trigger calling this Job can be generated.

  1. In the MDM Repository tree view, under the Job Designs node, right click the message Job.

  2. In the contextual menu, select Generate Talend Job Caller Trigger, accept the default options and click Generate.

    A trigger used to call the message Job is generated and stored under Event Management > Trigger. Its name is CallJob_Message, and its Service JNDI Name is callJob.

  3. In the Trigger xPath Expressions area, customize the conditions of the trigger according to your needs.

    In this example, add the following conditions:

    XPathOperatorValueCondition
    Update/DataClusterMatchesProductC1
    Update/DataModelMatchesProductC2
    Update/OperationTypeMatchesUPDATEC3
  4. In the Conditions area, combine the conditions using the predicates.

    In this example, enter the following: C1 AND C2 AND C3.

    In this way, this Trigger will be executed on a record in the Update entity only when a Product data record has been updated.

  5. Deploy the customized Trigger to the MDM server.

Updating a data record in a specific data container

  1. Log onto your Talend MDM Web User Interface.

    For further details about how to log onto the Talend MDM Web User Interface, see Talend MDM Web User Interface User Guide.

  2. In the upper right corner of the web page, make sure the Actions panel is displayed.

  3. In the Domain Configuration area, select the required data container and data model.

    In this example, select Product for both the data container and the data model.

  4. Click Save to save your changes.

  5. Go to the Master Data Browser page, and select the Product entity from the list.

  6. Double-click one of the product records to display its viewable attributes in a new view dedicated to this product.

    In this example, open the product record Talend Mug with the Unique Id of 231035938.

  7. Update one of the attribute values in the product record.

    In this example, update the record by selecting the Availability check box to make it available.

  8. Click Save to validate this update.

Accessing the Update Reports

  1. In the MDM Repository tree view, double click Data Container > System > UpdateReport to open the UpdateReport view.

    An Update Report is a complete track of all create, update or delete actions on any master data.

    If the UpdateReport data container is not available, you may first have to import it from your MDM Server. For details of how to import system objects from the MDM Server to your local repository, see the Talend Studio User Guide.

  2. Next to the Entity field of this view, click the search button to search all the action records in the UpdateReport.

    Note that the Update entity does not necessarily mean that the corresponding action recorded is update, since it is just the entity name defined by the data model of UpdateReport and may record different actions including create, delete, and update.

  3. Locate the record that corresponds to your action of updating the data record as described in Updating a data record in a specific data container.

    The update report record will be routed to Event Manager, whose primary key is genericUI.1499236505686.

Setting up the Job to route the update report record to Event Manager

  1. In the Integration perspective, right-click Job Designs in the Repository tree view and select Create Standard Job in the contextual menu.

  2. Enter RouteRecord in the Name field in the wizard that opens, and then click Finish.

  3. Drop the tMDMRouteRecord component from the Palette onto the design workspace.

  4. Double click this component to open its Component view.

  5. In the URL field, enter the URL for accessing your MDM server.

    In this example, enter http://localhost:8180/talendmdm/services/soap.

  6. In the Username and the Password fields, enter the credentials for accessing the MDM server.

  7. In the Data Container field, enter the data container name that stores the record you want to route.

    It is UpdateReport in this example.

  8. In the Entity Name field, enter the entity name that the record you want to route belongs to.

    It is Update in this example.

  9. In the IDS area, click the plus button under the table to add a new line.

    In the newly added line, fill in the primary key of the update report record to be routed to Event Manager, which was read earlier from the UpdateReport data container.

    In this example, the primary key is genericUI.1499236505686.

Saving and executing the Job

  1. Press Ctrl+S to save the Job.

  2. Press F6 to run this Job.

    In this example, since the Product data record with the Unique Id of 231035938 is updated, the component tMDMRouteRecord submits the primary key of the corresponding update report record to the Event Manager.

    When the Event Manager checks this record and confirms that this record meets the conditions in the trigger CallJob_Message's configuration view, the Event Manager calls the trigger to invoke the message Job.

  3. Verify the execution results of this Job by consulting the MDM server log to see that the notification ------- A Product is Updated.-- is printed out.

    You can check the server log in one of the following ways:

    • In the Server Explorer panel, right-click the connection to the server where MDM server is installed, and then click View Server Log. A Console opens displaying the most recent contents of the mdm.log file.

    • You can also view the contents of the mdm.log file in a browser. For more information, see the Talend Studio User Guide.

    • If you have direct access to the MDM server, you can also consult the file directly in the <$INSTALLDIR>/log directory, with INSTALLDIR indicating where the MDM server is installed.