• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Operating System variables how to read them in a Job

#1 2009-02-09 17:23:02

nicolasdiogo
Member
Company: BrainPowered - BI Services UK
Registered: 2006-11-24
Posts: 380
Website

Operating System variables how to read them in a Job

Hi folks,

could you please explain me how to read variables in the OS from a job?

is there a single approach that works for windows and linux (*unix)?

i am using Java in Talend.


thanks,

Nicolas

Last edited by nicolasdiogo (2009-02-09 17:24:52)

Offline

#2 2009-02-09 23:00:29

Volker Brehm
Member
Registered: 2007-04-03
Posts: 1139
Website

Re: Operating System variables how to read them in a Job

Hi Nicolas,

you could use System.getenv("VARIABLENAME").

Bye
Volker

Offline

#3 2009-02-10 11:59:26

nicolasdiogo
Member
Company: BrainPowered - BI Services UK
Registered: 2006-11-24
Posts: 380
Website

Re: Operating System variables how to read them in a Job

Thanks Volker,

since talend has a component for setting variables i was looking for a component to read them as well.

thanks once more,

Nicolas

Offline

#4 2009-02-10 12:36:48

Volker Brehm
Member
Registered: 2007-04-03
Posts: 1139
Website

Re: Operating System variables how to read them in a Job

Hi Nicolas,

sorry too say that, but I think the component tSetEnv doesn't set any system environment variable. You should add the as parameter in the component tSystem. The documentation on the component list seems to be wrong (or the component?).

It is technical not possible to generally set a system environment variable in java for security reason.

Bye
Volker

Offline

#5 2009-02-11 14:46:13

nicolasdiogo
Member
Company: BrainPowered - BI Services UK
Registered: 2006-11-24
Posts: 380
Website

Re: Operating System variables how to read them in a Job

Volker,


thanks for the clarification.

i will double check my jobs and move them to another PC to make sure work as expected.


regards,

Nicolas

Offline

#6 2009-02-11 20:02:41

Volker Brehm
Member
Registered: 2007-04-03
Posts: 1139
Website

Re: Operating System variables how to read them in a Job

Hi Nicolas,

if you give some information about your problem. Maybe there is another solution.

Bye
Volker

Offline

#7 2009-02-12 11:44:02

nicolasdiogo
Member
Company: BrainPowered - BI Services UK
Registered: 2006-11-24
Posts: 380
Website

Re: Operating System variables how to read them in a Job

Volker,

i am using both windows and linux.
so i was loooking for an approach to set the variables in both OS.

Nicolas

Offline

#8 2009-02-12 21:45:44

Volker Brehm
Member
Registered: 2007-04-03
Posts: 1139
Website

Re: Operating System variables how to read them in a Job

Hi Nicolas,

does setting the variables directly in tSystem help you out?

Bye
Volker

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Operating System variables how to read them in a Job

Board footer

Powered by FluxBB