Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
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 (2)
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.