Talend: get SOUNDEX of String in tMap

193 Views Asked by At

I am inserting data from a CSV file to a MySQL database, and one of the columns should contain the SOUNDEX representation of a string.

For example, I have the first name as a column in the CSV and the database should contain its SOUNDEX.

I am using tMap between the file delimited and MySQL output, so the operation should be there. Something like SOUNDEX(row1.FIRST_NAME).

Details: Talend Open Studio, MySQL database

1

There are 1 best solutions below

6
Ibrahim Mezouar On BEST ANSWER

You can use Apache Commons Codec to do this. First load the library using tLibraryLoad:
enter image description here

Then use:

new org.apache.commons.codec.language.Soundex().encode("<string>")