Tutorial Gateway

  • C
  • C#
  • Java
  • Python
  • SQL
  • MySQL
  • Js
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Python Programs
    • Java Programs

Talend Parent Child Job

by suresh

This section covers the steps to create a Talend Parent Child job with an example. It also helps you understand how we can pass values from Talend parent job to child job using context variables. When we want to use the child job ETL in Talend parent job, we can use tRunJob.

Talend Parent Child Job Example

To demonstrate the Talend Parent Child Job, we use the below Emp Information text file.

Talend Parent Child Job 0

Create a Talend Child Job

First, we created a child job and named it as the Child_Job. Next, we used the Talend tJava component to print a simple message.

Talend Parent Child Job 1

The above text file has five columns, and we want to print all the column values except the Emp ID using the child job.

In general, we don’t get the values from parent job to child job. To provide the same, we need context variables. Let me add four contexts within this the child job to accommodate those text file columns.

Talend Parent Child Job 2

Within the tJava components tab, we added the following Java code.

System.out.println(
StringHandling.UPCASE(context.FirstName + " " + context.LastName) +
" Working as a " + context.Occupation + " earning " + context.YearlyIncome + " Monthly!"
);
Talend Parent Child Job 3

The above code will concat first name and last name. Then the UPCASE function converts the name to uppercase.

Create a Talend Parent Job

As you can see, we created another job called Parent_Job and added the tFileInputDelimited to load text file data into Talend.

Talend Parent Child Job 4

We selected the File name using the browse button and changed the Filed separator to a comma.

Talend Parent Child Job 5

Please click on the Edit Schema and add the Column names and the length.

Talend Parent Child Job 6

Next, we added the tFlowToIterate to iterate the rows in a text file, and then, added the tRunJob. It means for each row in the text file, the tFlowToIterate helps to iterate tRunjob and displays the print statement.

Talend Parent Child Job 7

Within the tRunJob Component tab, we have selected Child_Job.

Talend Parent Child Job 8

Within the Context Param, use the add button to add the child job’s context param, i.e., FirstName. If you don’t have any context variables, then we can’t pass any values from the Parent job to child job.

Talend Parent Child Job 9

Next, we assigned the FirstName of the Main row to this context parameter.

Talend Parent Child Job 10

Similarly, assign the values for the remaining context parameters.

Talend Parent Child Job 11

Once hit the run button of this Talend Parent Child Job, you can see the result. If you see the execution flow, tRunJob has executed ten times because there are ten rows in the Employee table.

Talend Parent Child Job 12

Placed Under: Talend

  • Talend Download and Install
  • Create a Talend Business Model
  • Create a Talend Job
  • Create a Global Context Group
  • Connect Talend to SQL Server
  • Context Group to connect DB
  • Talend Read Text File
  • Talend Read Excel File
  • Load Text File Data into Database
  • Load Excel Data into Database
  • Export Database Table to Excel
  • Export Database Table to TextFile
  • Export Database Table to XML
  • Export Database Table to JSON
  • Talend Aggregate Row
  • Talend Aggregate Sorted Row
  • Talend Buffer Input & Output
  • Talend Create Table
  • Talend tDenormalize
  • Talend Datatype Conversion
  • Talend tMap Type Conversion
  • Talend Filter Columns
  • Talend Filter Rows
  • Talend tMap filter rows
  • Talend tFileList
  • Talend tFixedFlowInput
  • Talend tForeach
  • Talend Fuzzy Matching
  • Talend Joins
  • Talend tMap Joins
  • Talend tMap Join Lookup
  • Talend tJava
  • Talend tJavaRow
  • Talend tJavaFlex
  • Talend tLoop
  • Talend tMsgBox
  • Talend tNormalize
  • Talend Pivot Columns
  • Talend Replace Data
  • Talend Replicate
  • Talend tRowGenerator
  • Talend tRunJob
  • Talend Rejected Rows
  • Talend Sample Row
  • Talend Sort Row Data
  • Talend SCD
  • Talend SCD Type 2 Manual
  • Talend Unite
  • Talend Unique Row
  • Talend Read Multi-Structure File
  • Talend Parent Child Job
  • Talend Execute SQL Queries
  • C Tutorial
  • C# Tutorial
  • Java Tutorial
  • JavaScript Tutorial
  • Python Tutorial
  • MySQL Tutorial
  • SQL Server Tutorial
  • R Tutorial
  • Power BI Tutorial
  • Tableau Tutorial
  • SSIS Tutorial
  • SSRS Tutorial
  • Informatica Tutorial
  • Talend Tutorial
  • C Programs
  • C++ Programs
  • Java Programs
  • Python Programs
  • MDX Tutorial
  • SSAS Tutorial
  • QlikView Tutorial

Copyright © 2021 | Tutorial Gateway· All Rights Reserved by Suresh

Home | About Us | Contact Us | Privacy Policy