The purpose of this tutorial is to show how to create a process link in the MDM user interface that directly calls a job that was created in the Talend Studio.
Create a data model and a data container Customers. Add the elements CustomersId, FirstName, LastName, Location
Generate a view for the entity Customer
Deploy the data model, data container and the view to the MDM Server. In your web browser navigate to http://localhost:8180/talendmdm (user: user, password: user). In the Domain Configuration select the Customers model and the Customers container. Open the Master Data Browser and select the entity Customer. Create a few new records within the Master Data Browser:
Create a new job called CustomersToCSV and put the following three components on the designer canvas:
Double click the TMDMInput component and set the basic settings (password: “talend”):
Set the advanced settings:
Connect the TMDMInput to the Tmap component with a Main row:
Double click the Tmap component, add a new output table and drag the input columns to the output table.
Connect the Tmap component to the tFileOutputDelimited component with a row that has the name of the new created output table:
Double click the tFileOutputDelimited component and enter the file name and path that you want for your output file. Select the Include Header check box if you want to include the column names in the output file.
After completing the job be sure to deploy it to the MDM server! You can leave all the settings for deploying as they are.
Now to be able to call this job from the MDM UI you will have to create a new process under Event Management – Process (MDM Perspective). Right click Welcome Action and click New.
In the next screen click Next and in the screen that follows enter ExportToCSV in the Optional Name field. Click Next and then click Finish.
Set the description for the process:
Add a new step called Calljob and remove the steps that existed already.
In the step specification of Calljob select the plugin name calljob. And then set the input variable and parameter as well as the output variable and parameter. In the Parameters area you will need to specify the url of the Talend job that you want to call.
Now deploy this process to the MDM server and relogin to the MDM UI via the web browser. At this point the new process should show up in the Processes box and it will run by clicking it.
A message appears when the process is finished:
And here is the content of the csv output file:
This tutorial was created using Talend Open Studio for MDM version 5.6.1.