• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » how to make context variable available to all subjobs

#1 2012-05-04 11:03:30

neosz
Guest

how to make context variable available to all subjobs

As asked in subject I've got a context variable valued in a subjob and I want to make it available in all the project (other subjobs included). How can I achieve it?

Thanks in advance. smile

#2 2012-05-04 11:10:03

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: how to make context variable available to all subjobs

Hi

In fact, I feel confused about these concepts you mentioned at Comment#1.
Usually in talend, a project means it contains several jobs which are saved in the same workspace\ProjectName.
A subjob means a combination with several components just in one job which you can use 'OnSubjobOk' or 'OnSubjobError' or 'Run-if' to trigger.
It seems that I misunderstand your requirement. I'm sorry.

Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-05-04 11:22:25

neosz
New member
Registered: 2012-05-04
Posts: 8

Re: how to make context variable available to all subjobs

The situation is:


I have 2 subjobs: A and B inside a job called MAIN.

In the subjob A I valued a context variable named context.process_id and I need to read the value of context.process_id in subjob B. Is it possible to do it?

Thanks very much Pedro

Offline

#4 2012-05-04 11:24:48

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: how to make context variable available to all subjobs

Hi

This context variable is accessible by all subjobs in this job.

Regards,
Pedro


Only Paranoid Survive.

Offline

#5 2012-05-04 18:30:09

neosz
New member
Registered: 2012-05-04
Posts: 8

Re: how to make context variable available to all subjobs

I made it accessible creating the context variable in the main job and selecting an option as in the picture. It allows to pass the value of the variable to the subjobs.

Thanks

Offline

#6 2012-05-10 12:59:09

andreino
New member
Registered: 2012-05-10
Posts: 3

Re: how to make context variable available to all subjobs

Hi,

I've the same problem.
I populate a context's variable in a subjob but when I turn back to main job, if I call that variable from a tJava component, it's "null".
I've tried also using a tBufferOutput but it doesn't work correctly.
How can I pass values set in subjob to the main job?

Thanks

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » how to make context variable available to all subjobs

Board footer

Powered by FluxBB