Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to split the string into two halves and then interchange in the tmap.
Ex: my string is of length 8, ABCDEFGH
I want the output as EFGHABCD
Please suggest a solution.
Hi,
Assuming the input is a not null column and always have 8 characters, please see the solution below.
row1.data.substring(4,8)+row1.data.substring(0,4)
You can check the length of the string as a parameter to function, if you want to change it dynamically for varying string length.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi,
Assuming the input is a not null column and always have 8 characters, please see the solution below.
row1.data.substring(4,8)+row1.data.substring(0,4)
You can check the length of the string as a parameter to function, if you want to change it dynamically for varying string length.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂