Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I have a Parent Job calling a child job which extracts data from MSSQL to a flat file and i want the NB_LINE from Tmssqlinput to be returned to Parent. What i did was - In child job after the flat file i put tjavarow and assigned the NB_LINE to a output_row and passing that to a tbufferoutput. From parent job i Unchecked "Transmit Whole Context" and have copied child job schema and Checked "Propagate the child result to the output schema" and connected this to a tjavarow. When i try to print the input_row from the Parent tjavarow which inturn comes from the trunjob it is displaying as NULL. What am i doing wrong?
Help me to fix this !
Hello,
When "Propagate the child result to the output schema" option is not checked, it just propagates the input data to output connector when the column name and type are the same.(It works as it used to do)
When it is checked, Dynamic or independant, it will propagate the input data to output connector; otherwise, it will output the result from the child job.
Note: when there is no input with output, the new checkbox doesn't make sense and the output connector outputs the result from the childjob.
Best regards
Sabrina
Hi,
I try debugging the child job first. Attached the tjavarow statement i used - it just simply displays the number of records flowing through the mssql link. This job now have pulled 3 records to a flat file. But the tjavarow display as null (3 times).
Also, the tjavarow shows null 3 times corresponding to the 3 records written to the file. How to make it show the NB_LINE only once or should i use any other component to acheive this? I know tjavarow run the java snippet for every row. Please clarify.
Hello,
For your parent job, did you set the schema of tRunJob component as the same as the schema of tBufferOutput component in child job?
Best regards
Sabrina
Hi,
Yes i have setup the Schema as same as tbufferoutput but that does not resolve the problem. When i was sending the NB_LINE from subjob i used (Integer).globalMap.get("tMSSqlInput1_NB_LINE") but then i added another "(" to it ( (Integer).globalMap.get("tMSSqlInput1_NB_LINE") ) and it resolved and now i am able to use my record count in Parent Job. Thank you.
But now my another question is - In My parent Job "Advanced Settings" - i have unchecked "Propagate the child result to the output schema" but still am able to see the result from Child. Why is it so? I believe if we check this box only the Child would be able to pass the output to parent.
FYI - it is not "dynamic job" nor i checked "Use an independent process to run subjob"
Hello,
When "Propagate the child result to the output schema" option is not checked, it just propagates the input data to output connector when the column name and type are the same.(It works as it used to do)
When it is checked, Dynamic or independant, it will propagate the input data to output connector; otherwise, it will output the result from the child job.
Note: when there is no input with output, the new checkbox doesn't make sense and the output connector outputs the result from the childjob.
Best regards
Sabrina
Thanks for letting me know. !