Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm currently working on extracting data from a file using a tJavaFlex. I use the substring method a lot. But now I need to use cases. In fact, I'm extracting a string from the file that can correspond to more than 100 categories. I can create a hundred cases in my tJavaFlex, but that makes the code harder to read. So is there a more efficient way to do this in Talend?
Thank you !
Hello @Stéphane Barbezier ,
To avoid multiple switch case statements in java, you can use HashMap as instead.
Please refer to this:
https://stackoverflow.com/questions/64692014/how-to-avoid-multiple-switch-case-statements
Best regards
Aiming