Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to pass a message with 100columns from Parent to child job in TOS?

Hi Team,
I am trying to build a Talend project which has PARENT and CHILD job design. In parent job i plan to continuously read json messages from tKafkaInput component and then replicate this data into different branches. And each branch will extract json message as per the DB table schema and then call corresponding table child job.

JSON message schema: It has metadata columns like tablename, timestamp, and database table1 columns and like wise other json message will have tablename, timestamp, and database table2 columns in schema

Problem1: How to redirect extracted json message to a child jobs based on a condition. This condition will be a TABLENAME check like if jsonmsg.Tablename = "harcode Table1name" then only call the child job to process the message.

Problem2: After extracting json message as per table schema and doing a tablename check, how to pass the read extracted json message with 100s of columns for CHILD job to process. 
Thanks for your help and time in advance.
Let me know if i need to provide more information.

Labels (2)
3 Replies
_AnonymousUser
Specialist III
Specialist III

Hi,
i would pack the message in one string and parse it in the childjob
you can pass the message via the context of the Job:

create a contextvariable  "myJsonClob" type String in the subjob
in your parentjob you set it in the component window of the subjob dynamicly while dispatching to the diffrent subjobs
(i.e. (String)globalMap.get("actualJsonClob") )

HTH

DJ
Anonymous
Not applicable
Author

Thank you, DJ for your prompt reply.

That is a good suggestion, even i thought about if after posting this question. But, if i have to pass whole jsonmsg from parent to child in continuation, then can i do that without making use of tSetGlobalVaribale & tFlowtoIterate components? If yes, how?

Second question, how can i check for a RUNif condition in my data flow and at the same time pass the data ahead if RunIf condition is satisfied? Say i read a json message using tkafkainput, i replicate into 4 different branches and then in each branch i want to check if this message (contains some string which will be a tablename). Only if message containg TABLE 1 in string, then call child Job1 and pass the json message. Other 3 branch won't call their subsequent child jobs when tablename condition check is failed?

Thanks for your time.
_AnonymousUser
Specialist III
Specialist III

Use a tmap with a conditional for each outgoing row ( as much cases, as much outputrows)

Every outputrow end in an row2iterate which "saves" the Parameter  implicit as "rowname.colname" in the globalmap and then triggers the subjob which has getGlobalmap("rowname.colname") to set the context


cheers