Running the view result through a Process (registry style lookup) - 6.3

Talend Data Fabric Studio User Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
task
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

Talend Studio enables you to enrich data, on the fly, by looking up fields in the source system through a Process attached to the View, whether it is a simple or a composite View. Using Processes with Views will help optimizing system performance.

For example, when an interaction is done on a business entity that is not persisted or not totally persisted in the MDM Hub, the MDM Hub will be able to resolve specific elements for this entity by referring to the source system. You can achieve this behavior if you:

  • indicate what elements in the business entity or entities are to be transformed or enriched by the Process,

  • create the corresponding Process,

  • create a View on the viewable/searchable elements in the business entity and attach the Process to this View that will run the view result.

When a steward or a business user connects to Talend MDM Web User Interface and browse the records/Views of the business entity/entities, the Process will lookup the defined elements (values) from the source system and display them in the web user interface without really saving them in the MDM Hub.

How to define the elements to be transformed/enriched by a Process

Consider as an example that you want in your data model to retrieve the agency region, on the fly, from the source system without really saving the region in the MDM Hub.

Prerequisite(s): You have already connected to the MDM server from Talend Studio. A data model has been already created.

To define the entity elements to be transformed/enriched by a Process, do the following:

  1. In the MDM Repository tree view, expand the Data Model node and double-click the data model in which you want to define the elements to be handled by the Process.

    In this example, you want to set a lookup field on the Agency entity in order for a corresponding Process to retrieve the agency region from the source system.

  2. In the Data Model Entities panel, right-click the entity from which you want to select the element(s) to be handled by the Process.

    A contextual menu pops up.

  3. Select Set Lookup Field.

    The [Set Lookup Fields] dialog box displays.

  4. Click the arrow and select from the list one of the elements pertaining to the selected entity.

  5. Click the icon in the upper right corner to add the selected element to the Lookup Fields list.

  6. Do the same to add as many elements as necessary to the Lookup Fields list.

    Warning

    Only listed elements will be transformed/enriched on the fly by the Process. If this Process modifies anything else in the XML record, these modifications will be ignored at the entity level because the Process will send only the specified elements and not all the XML record.

  7. Click OK to close the dialog box.

    The defined look up field(s) display(s) under the Annotations node corresponding to the entity selected in the Data Model Entities panel.

How to create a Process to enrich data on the fly

The Process used to run a View results can have a number of steps and plug-ins including CallJob. The Process will map MDM to the source system and then retrieve data from the source system to complete the record. For further information on Process types, plug-ins and the procedure to create a Process, see Processes.

When a steward or a business user connects to Talend MDM Web User Interface and browse the records/views of the business entity/entities, the Process will lookup the defined elements (values) from the source system and display them in the web user interface without really saving them in the MDM Hub.

Prerequisite(s): You have already connected to the MDM server from Talend Studio.

Follow the steps outlined in How to create a Process from scratch to create a normal Process and call it LookupLocation, for example.

  1. Add a step name in the Step Description field and click the plus button to add it to the Steps Sequence list.

  2. Click the step name to display the Step Specifications area. Here you can define the step parameters.

  3. Set the Process input variable name to _DEFAULT_.

    The default input value is a text, its format is as the following <cluster name>.<concept name>.<ids>, you can use it to do the cross referencing in your customized Job.

  4. From the Plugin name list, select callJob.

    This Process invokes a Job, DetermineRegion, to connect to the source system that holds the data you need, the agency region in this example, and then retrieves this data to complete the Region field in the data record in Talend MDM Web User Interface.

  5. Set the Process output variable to output.

  6. In the Parameters area, enter the parameters for the calljob plug-in as the following:

    <configuration>
                   <url>http://localhost:8180/DetermineRegion_0.1/services/DetermineRegion</url>
       <contextParam>
            <name>xmlRecord</name>
            <value>{_DEFAULT_}</value>
       </contextParam>
       <conceptMapping>
            <concept>Agency</concept>
            <fields>{p1:Region}</fields>
       </conceptMapping>
    
    </configuration>
  7. Click the save icon on the toolbar or press Ctrl + S on your keyboard to save the Process.

    The newly created Process is listed under the Process node in the MDM Repository tree view.

How to run the view results through a process

Prerequisite(s): You have already connected to the MDM server from Talend Studio. A Process corresponding to your needs has already been created.

To run the view results through a Process, do the following:

  1. Follow the steps outlined in Creating a View to create a View on the corresponding data model.

  2. Select the Run the view results through a process to make the Process list available.

  3. Click the arrow and select from the list the Process you want to attach to the current View, LookupLocation in this example.

  4. Click the save icon on the toolbar or press Ctrl + S on your keyboard to save the View.

Now every time the business user or data steward browses the data records through this View from Talend MDM Web User Interface, the Region field will display the value retrieved by the Process from the source system without really saving it in the MDM Hub. For further information on how to browse data records, see Talend MDM Web User Interface User Guide.

Warning

If a field does not have any original value, its data will not be updated in the View by the Process.