Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Nirupam
Contributor
Contributor

contextStr give a random number appended in TAC 8

we are reading contextStr in a job, in version 6 we are getting the value as the name of the context but in talend 8 we are getting a random value appended. with the context name, how to get rid if the random value

example:

System.out.println(" [ env ]" + contextStr);

if (contextStr.equals("PROD"))

{

context.envCheck = true;

} else {

context.envCheck = false;

}

System.out.println(" [ envCheck ]" + context.envCheck);

out put;

[ env ]PROD_594157714127438481

[ envCheck ]false

Labels (3)
1 Reply
anselmopeixoto
Partner - Creator III
Partner - Creator III

Hi @Nirupam Samantha​ 

That's annoying behavior introduced on version 8.

As a workaround, I suggest you change all the references to contextStr to contextStr.split("_")[0]

 

I hope this helps you.