Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Discuss and learn more about design and development in formerly Talend products.
I'm having a strange problem with Talend.
I've developed a relatively simple job that queries records from one system via a tRestClient component. The records are extracted, transformed, and transferred to a target Salesforce system.
I'm using context variables to determine the connection credentials for each system. The problem I'm encountering is that for the specific context variables being used in the tRestClient component, they are completely wrong.
For example: I've defined a Test environment. I've set the "Host" variable to "https://asdf.com/sourcesystem/". I can see in the run window's view of context variables that this is set correctly. When I run the job, I get a host not found error, unless I hardcode the host in the tRestClient component.
I dumped the values of the context, and to my surprise the "Host" variable is not set correctly. It contains the wrong value... say, "https://rtyu.com/sourcesystemB/". As many times as I've tried to correct, commit, update, you name it, this incorrect value persists.
Is there some trick or something I'm missing here? Why can't I get the correct value loaded into the tRestClient component?
I've also tried creating a new variable with a different name, but the context as a whole seems to be stuck in some old state.
(Edit)
An update: I've tried adding a new variable of a different name into the context, but it is not showing up when I dump it.
I've also tried creating an entirely separate job and dumping the context there, and it IS updated. The problem seems to be specific to the job I'm actively developing, it's "stuck" with a stale context that is both missing new variables and contains old values.
(Edit 2 - SOLVED)
Ah, I've figured it out. Apparently a job can erroneously cache old contexts. Updating values or adding new variables will not work in this state, and even in other subjobs this "stale context" can persist, causing massive problems.
What I did was deactivate the job that seemed to be most closely associated with this "stale context". As soon as I did so, the next time I ran the job all the proper context variables were reported, as well as their correct values. I then reactivated the affected job, and it was still correct.
TLDR; If you find your context variables out of whack with no clear explanation, try deactivating and reactivating nearby jobs and subjobs. It's the equivalent of kicking a machine to make it go, but hey. If it saves YOU, the reader, a few hours of mystery and frustration, then give it a try.