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: 
BA621858188
Creator
Creator

Prejob issue if we keep both in Joblet and Main job

Hi All,

I have one joblet that I use within the main job. I am running some SQL statements in both joblets and in the main job, so for that I need to make database connections. If I use the prejob ---> tdb connection in both places, I will get a warning as the prejob is also in the main job. (For example, there must be only one prejob.) If I don't use prejob and directly use tdbconnection, it is running randomly, so mysql statements are running first and then tdb connection, which will cause an issue.

 

How can I avoid this, as I need to run the tdbconnection component first to connect to the database?

Labels (4)
3 Replies
Anonymous
Not applicable

@Vrushabh Malbari​  can you share a screenshot of the joblet design?

 

BA621858188
Creator
Creator
Author

@Shicong Hong​ ,

 

Joblet design -

 

tprejob --> tdbconnection

 

Input (taking from the main job) ---> tjava (to store the input in context) ---> tdbrow (calling procedure) ---> output (to pass or use in the main job)

 

Above is the Joblet design.

Anonymous
Not applicable

The warning message indicates tPreJob component can be used only one time in a job, so you can use tPreJob component in joblet, and use onsubJobOK trigger to control the execution order of subjobs in main job.