N/A

use talend job-name as variable

Hello,
I'd like to use the name of the TOS-job within the job itself.
Is this possible? How do I get this information?
I'm coding in java.
Tkanks a lot!
7 REPLIES
Community Manager

Re: use talend job-name as variable

Hello
Yes, there is a global var: jobName, for example:
on tJava:
String name=jobName;
System.out.println(name);
tip: press ctrl+blank space in any text filed, you will see a list of global vars and context vars, eg: jobName, projectName.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: use talend job-name as variable

how can i print the context group being used in the job ? 
i have variables defined in context groups (DEV/QA/PROD). I want to print the group used in the job.
Community Manager

Re: use talend job-name as variable

Hi m_shiva2003
You can access the context group with this variable contextStr in the job.
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: use talend job-name as variable

Thanks Shong. Appreciate your help.
where can i find list of standard global variables available in talend? ( i could't find in talend reference guide)
Community Manager

Re: use talend job-name as variable

Hi  
No a documentation or article lists the these global variables yet, however I think there should be one. I will create a jire issue for this. 
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars svs
Four Stars

Re: use talend job-name as variable

Hi Shong

 

Did you ever create the list of global variables?

Eleven Stars

Re: use talend job-name as variable

@svs,when you execute it will take the current job name if you use jobName global variable

Manohar B