Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
@Vrushabh Malbari can you share a screenshot of the joblet design?
@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.
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.