Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In Talend I have one table who have one column named "column1" has data
column1
I'm from USA
I'm from India
I'm from Canada
and I want to create a new column named column two in the same table where data will be populated from the above data
column2
USA
India
Canada
After this when I will store the updated table data it will be like
column1 column2
I'm from USA USA
I'm from India India
I'm from Canada Canada
I'm able to read the table but stuck in the transformation part.
How to do the above scenario in Talend?Hi
Add a new column in the output table on tMap, set its expression as:
row1.newColumn.substring(row1.newColumn.lastIndexOf(" ")+1)
//This expression is used to intercept the substring since the last space.
Hope it helps you.
Regards
Shong
Hi
Add a new column in the output table on tMap, set its expression as:
row1.newColumn.substring(row1.newColumn.lastIndexOf(" ")+1)
//This expression is used to intercept the substring since the last space.
Hope it helps you.
Regards
Shong
Thanks, Shong. It worked.
Great, thanks for your feedback!