Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Talendians,
I have a context subjob which loads all the database connection parameters from outside of Talend Job from Job server. I want to create a joblet for effective re-use. Joblet is the first step i want to run inside my job so that all the context will be loaded as i progress. I tried using trigger input -> Load context -> trigger output using onsubjob ok trigger. When i try to use the joblet inside my job, it is working as expected.Can someone tell me what is the best way to design a joblet?
Looks ok to me, you say it is working, are you just after any other "best practice" design suggestions?
We have a very similar joblet that loads context variables from MySQL. Ours has a tLogRow component so that every job writes its context variables out to the log at the start, I added a tSort component to get them into sorted order.
Ours also has a tPreJob component, and we don't link it on the job canvas. I'm not entirely happy with that, as it makes it impossible to use a tPreJob component anywhere else. I think your method of linking it with an On Subjob Ok link is better.
Our design is this: