Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.