use talend job-name as variable

Not applicable

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!
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)
Highlighted
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?

Forteen 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
Don't forget to give kudos/accept the solution when a replay is helpful.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch