Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How to implement below code in Talend. I am new to Talend
IIF(INSTR(StringIn, '÷÷÷', 1, 1, 1)>3,
SUBSTR(StringIn, 1, INSTR(StringIn, '÷÷÷', 1, 1, 1)-1),
StringIn)
Thanks
what is your level?---Beginner
did you have make your first job?---yes created.
did you suces on tutos?--Not yet
what is exactly your problem?---in tmap I have to implement below code.
Below are few function definition-
--INSTR(str1 as string, str2 as string, m as integer, n as integer, comparisonType as numeric) .
--INSTR function Returns the position of a character set in a string, counting from left to right.
---Substr function takes out the substring
if length of characters in s string is greater than 3 just resturn me first 3 characters. Cut all the other '÷÷÷'
it may help you…
in tmap click on … button
then you may use predefine functions or write your in java code
good luck
I believe you are looking for below solution.
The function is as shown below.
row1.data.length()>3? row1.data.substring(0,3):row1.data
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