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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

NB_LINE returned from child Job is NULL - Why?

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 !

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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

View solution in original post

6 Replies
TRF
Champion II
Champion II

Hi,
Can you share your job design and the piece of code from the tJavaRow component?
Anonymous
Not applicable
Author

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.


Child.PNG
Child1.PNG
Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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"

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

Thanks for letting me know. !