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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
jensej
Creator
Creator

[resolved] Ignore Subjob if tMysqlInput return 0 rows

Hey guys
I have a job that writes me pdf's from the sales on four different Shops.
If one shop doesnt have any sales that day i want to write an empty pdf or in worst case do nothing.

Now to my Problem. It seems like tFileOutputPDF component cant handle 0 rows and therefor my job crasches.

Can i do some workaround to solve this? For example make a test before each step and if tMysqlInput returns 0 row i just jump to the next subjob?

Thanks  0683p000009MGt5.jpg

Labels (2)
1 Solution

Accepted Solutions
jensej
Creator
Creator
Author

Thanks for your help.
I was able to solve it like this.
Is your way easier or better in some way or do you like my solution?
If yours is better can you please add a picture how i should bind all components togheter. I didnt get it.

0683p000009MGx6.jpg

View solution in original post

3 Replies
Anonymous
Not applicable

1) Pass the data from your "La Boutique Romaine" component to a tHashOutput.
2) Create a subjob starting with a tHashInput linked to the tHashOutput previously mentioned.
3) Connect the subjob ending with the tHashOutput to the new subjob starting with the tHashInput using an IF Link. Connect the link between the tHash components. For the IF condition use something based on the number of rows loaded to the tHashOutput
jensej
Creator
Creator
Author

Thanks for your help.
I was able to solve it like this.
Is your way easier or better in some way or do you like my solution?
If yours is better can you please add a picture how i should bind all components togheter. I didnt get it.

0683p000009MGx6.jpg
Anonymous
Not applicable

My way is essentially the same, but doesn't require the second query of the database for each input. If the queries are not complicated and computationally expensive, your way is absolutely fine.