One Star

tRunJob using dynamic job option DOES work with shared db connections

I am using TOS 5.1.3
I successfully run tRunJob using the dynamic job option, and do not get errors when using shared db connections in my subjobs (child jobs).
The tRunJob documentation states the following:
This option is incompatible with the Use or register a shared DB Connection option of database connection components. When tRunJob works together with a database connection component, enabling both options will cause your Job to fail.
Was the above fixed, and the documentation is just out of date?
Dave

10 REPLIES
Moderator

Re:tRunJob using dynamic job option DOES work with shared db connections

Hi,
Did you check a "Use or register a shared DB Connection" option in your txxxConnection? Could you please share your screenshot of txxxConnection setting and workflow with us?
Best regards
Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re:tRunJob using dynamic job option DOES work with shared db connections

Hi,
Did you check a "Use or register a shared DB Connection" option in your txxxConnection? Could you please share your screenshot of txxxConnection setting and workflow with us?
Best regards
Sabrina


Sure. images are attached. So, have you heard this limitation was fixed?
Dave

Five Stars

Re:tRunJob using dynamic job option DOES work with shared db connections

Have you got a screenshot of the connection in your child job?

One Star

Re:tRunJob using dynamic job option DOES work with shared db connections

Have you got a screenshot of the connection in your child job?


sure. attached.
Dave

One Star

Re:tRunJob using dynamic job option DOES work with shared db connections

Have you got a screenshot of the connection in your child job?


attached.

One Star

Re: tRunJob using dynamic job option DOES work with shared db connections

Have you got a screenshot of the connection in your child job?


attached.
Sorry - had to get the file small enough to attach.
Dave

Five Stars

Re:tRunJob using dynamic job option DOES work with shared db connections

What I think is happening is...
You've passed context to your child job and you've entered the context parameters in to your child Job's connection.
You're actually creating a new shared connection; which happens to have the same name.
It's unfortunate that the check box is "Use or register..." as this causes confusion.
Try removing the context variables and you should see it fail.

Seven Stars

Re:tRunJob using dynamic job option DOES work with shared db connections

You can test by doing just an insert or update in the parent (with Auto-commit unchecked) and just a commit in the child. I can say fairly confidently that your change won't be committed.

One Star

Re: tRunJob using dynamic job option DOES work with shared db connections

What I think is happening is...
You've passed context to your child job and you've entered the context parameters in to your child Job's connection.
You're actually creating a new shared connection; which happens to have the same name.
It's unfortunate that the check box is "Use or register..." as this causes confusion.
Try removing the context variables and you should see it fail.


I hard coded the target connection params in the child. It did not fail, but the data did not get committed. I commit in the parent job. So, you are correct - it is just creating a "new" shared connection.
Talend should add functionality that overcomes this limitation.
thanks so much for your help!
Dave

One Star

Re:RunJob using dynamic job option DOES work with shared db connections

You can test by doing just an insert or update in the parent (with Auto-commit unchecked) and just a commit in the child. I can say fairly confidently that your change won't be committed.


yes - I did the reverse (commit in parent), but the child data did not get committed - so bummer Smiley Sad - does not work as I originally thought.
Thanks!
Dave