Skip to main content

Setting the schema for a Job called through a Trigger

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>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!