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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] stop talend job if zero (0) rows input

HI,
My job looks similar to the below:
tfileinputdelimited --(main)--> tmap --(main)--> staging_tbl (subjob1)
| \ ^
| (subjobok) \ (reject) | (lookup)
| \ dim1
| tfileout
v
staging_tbl--(main)--> tmap --(main)--> dim2 (subjob2)
| ^
| (subjobok) | (lookup)
| dim2
v
staging_tbl--(main)--> tmap --(main)--> dim3 (subjob3)
| ^
| (subjobok) | (lookup)
| dim3
v
other subjobs
:
:
some cases all my records in tfileinputdelimited are rejected to tfileout hence 0 rows loaded into staging_tbl.
Now I don't want to proceed beyond subjob1 (i.e. subjob2, subjob3, ... ).
Is there any way I can stop execution if 0 rows loaded into my staging_tbl.
Thank you.
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi
You might create a subjob between subjob1 and subjob2.
tJava--Run-if-->tDie
Let's say staging_tbl is using tMysqlOutput.
The run-if condition is ((Integer)globalMap.get("tMysqlOutput_1_NB_LINE"))==0.
Regards,
Pedro

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hi
You might create a subjob between subjob1 and subjob2.
tJava--Run-if-->tDie
Let's say staging_tbl is using tMysqlOutput.
The run-if condition is ((Integer)globalMap.get("tMysqlOutput_1_NB_LINE"))==0.
Regards,
Pedro
Anonymous
Not applicable
Author

Thank you Pedro. This is resolved.