How to get the current active context name ?

One Star

How to get the current active context name ?

Hi guys,
I need to make a distinction depending on the active context.
In "Default" i need to run a special job whereas in "Production" and "Test" context i don't have to.
Is there a way to deal with that, a way to retrieve the current or active context name ?
Thanks in advance,
Highlighted
One Star

Re: How to get the current active context name ?

Hi gavelin,
In Java, try contextStr.equals("Default").
Cheers,
c0utta
Community Manager

Re: How to get the current active context name ?

Hello
Is there a way to deal with that, a way to retrieve the current or active context name ?

Yes, there is a variable store the currnet context name
System.out.println(contextStr);

Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: How to get the current active context name ?

Does anyone know how to access contextStr in e.g. the properties for a component such as tFileCopy?

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch