Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have problem loading data from salesforce to mysql database. My data looks like below:
Data: Hey, Please can this one be updated our side? 😊
I have created a simple one-to-one mapping. Tsalesforce input and tdboutput.
I want to replace the smiley/emoji present in the string with a blank space. I am currently using tjavarow but it is not working. Any help on this will be really appreciated.
Hi,
Please try below method.
You need to use the below value for context variable.
"[^\\p{L}\\p{M}\\p{N}\\p{P}\\p{Z}\\p{Cf}\\p{Cs}\\s]"
The function used in tMap is as below.
row1.input.replaceAll(context.characterfilter,"")
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 @ikan
Could you please mark the topic as resolved since I have answered your query?
Marking a query promptly will help others in Talend community when they are looking solutions for similar queries.
It is also a way of telling thank you to the contributor for spending their time for your query in between their routine work.
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,
Could you please try below value to the context variable?
"[\\ud83c\\udc00-\\ud83c\\udfff]|[\\ud83d\\udc00-\\ud83d\\udfff]|[\\u2600-\\u27ff]"
Please refer the details in below link. You may have to add additional regular expressions based on your emoji if this is also not clearing the emoji.
https://stackoverflow.com/questions/44620294/removing-special-character-from-java-string
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 🙂