Setting the schema for a Job called through a Trigger - Cloud - 7.3

Talend Studio User Guide

Version
Cloud
7.3
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Design and Development
Last publication date
2024-03-20
Available in...

Data Fabric

MDM Platform

This is the typical case when a Process is called by a Trigger. The Process uses a callJob plugin to invoke a Talend Job created in the Integration perspective of Talend Studio.

Input Schema A document is passed on to the Job. The schema is:

<item>
         ... record ...
</item>

Assuming a Customer record, the complete result is:

<item>
        <Customer>
                <Firstname>Janet</Firstname>
                <Lastname>Richards</Lastname>
        </Customer>
</item>

Output schema If the Job returns nothing, MDM will generate a document with the Job return status in callJob output variable:

<results>
        <item>
                <attr>0=ok or 1=failed</attr>
        </item>
</results>

If the Job returns a table through a tBufferOutput component, MDM will define the following document in the callJob output variable:

<results>

     <item>
             <attr>col1</attr>
             <attr>col2</attr>
             etc.
     </item>
</results>

This result may be mapped back into an Entity by adding the following fragment in callJob configuration:

<configuration>
(...)
   <conceptMapping>
         <concept>Customer</concept>
         <fields>
           {
           p0:Firstname,
           p1:Lastname,
           }
        </fields>
   </conceptMapping>
</configuration>

Then callJobs output variable will receive:

<results>
        <Customer>
                <Firstname>col1</Firstname>
                <Lastname>col2</Lastname>
        </Customer>
</results>