You will find Talend Errors and solutions, Optimization, Tips & Tricks, Performance, Components Explanations ... and much more.
Thursday, 15 September 2016
Thursday, 8 September 2016
STRING RELATED FUNCTIONS IN TALEND
CONTAINS & EQUALS :
row1.contains("ram")
row2.equals("Name")
LASTINDEXOF :
("tFileList_1_CURRENT_FILE")).lastIndexOf("."))
SUBSTRING:
Input : "ABCD".substring(0,2)
Result : ABC
GETTING CURRENT FILEPATH IN tFILELIST :
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
GETTING CURRENT FILENAME FROM tFILELIST :
((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(0,((String)globalMap.get
("tFileList_1_CURRENT_FILE")).lastIndexOf("."))
replace() Example :
-------------------------
we can use this for replacing special characters in a string
Output :
-----------
{"NOTIFICATION_RESPONSE":{abcd:""kdkkxyzkll:""}}
Note : Go for replace() if replaceAll() is not working.
replaceAll() will not work for dollar ($),doublequotes("),comma(,) etc special characters, in such
cases you can go for replace().
row1.contains("ram")
row2.equals("Name")
LASTINDEXOF :
("tFileList_1_CURRENT_FILE")).lastIndexOf("."))
SUBSTRING:
Input : "ABCD".substring(0,2)
Result : ABC
GETTING CURRENT FILEPATH IN tFILELIST :
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
GETTING CURRENT FILENAME FROM tFILELIST :
((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(0,((String)globalMap.get
("tFileList_1_CURRENT_FILE")).lastIndexOf("."))
replace() Example :
-------------------------
we can use this for replacing special characters in a string
String input_row="abcd:[],kdkkxyzkll:[],";
String abc="{\"NOTIFICATION_RESPONSE\":{"+input_row.replace(":[],",":\"\"")+"}}";
System.out.println(abc);Output :
-----------
{"NOTIFICATION_RESPONSE":{abcd:""kdkkxyzkll:""}}
Note : Go for replace() if replaceAll() is not working.
replaceAll() will not work for dollar ($),doublequotes("),comma(,) etc special characters, in such
cases you can go for replace().
Subscribe to:
Posts (Atom)
get it
http://hinekv1.ddns.net:8008/get.php?username=Varga_Florentina1tv&password=j5MgWBs18t&type=m3u_plus&output=mpegts http://www.lo...