<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: talend trim function in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/talend-trim-function/m-p/2242985#M29632</link>
    <description>StringHandling.LEFT("Jan (192.168.2.200)",StringHandling.INDEX("Jan (192.168.2.200)"," "))
&lt;BR /&gt;Of course you could always create custom Routine under Code folder in Talend, where you could use then custom java import packages and define custom function to handle any of supported datatypes in way you expect.</description>
    <pubDate>Sun, 14 Nov 2010 16:18:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-11-14T16:18:52Z</dc:date>
    <item>
      <title>talend trim function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/talend-trim-function/m-p/2242984#M29631</link>
      <description>Hi guys 
&lt;BR /&gt;quick question concerning talend string trim 
&lt;BR /&gt;I get user inputs like these 
&lt;BR /&gt;Jan (192.168.2.200) 
&lt;BR /&gt;Jan 
&lt;BR /&gt;Piet (192.169.3.21) 
&lt;BR /&gt;Sam 
&lt;BR /&gt;Piet 
&lt;BR /&gt;I would like to remove the ip and the brackets they are in, it seems that SAP records the users like that. 
&lt;BR /&gt;because i would later compare then 
&lt;BR /&gt;i see there is a talend string function but i dont know the parameters 
&lt;BR /&gt;i was thinking of using something like 
&lt;BR /&gt;stringhandling.letf(row1.user_name, 1, ?? where "(" -2 ??) 
&lt;BR /&gt;??i dont know?? 
&lt;BR /&gt; 
&lt;BR /&gt;any help would be appreciated 
&lt;BR /&gt;thanx</description>
      <pubDate>Sat, 16 Nov 2024 13:12:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/talend-trim-function/m-p/2242984#M29631</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T13:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: talend trim function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/talend-trim-function/m-p/2242985#M29632</link>
      <description>StringHandling.LEFT("Jan (192.168.2.200)",StringHandling.INDEX("Jan (192.168.2.200)"," "))
&lt;BR /&gt;Of course you could always create custom Routine under Code folder in Talend, where you could use then custom java import packages and define custom function to handle any of supported datatypes in way you expect.</description>
      <pubDate>Sun, 14 Nov 2010 16:18:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/talend-trim-function/m-p/2242985#M29632</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-14T16:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: talend trim function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/talend-trim-function/m-p/2242986#M29633</link>
      <description>Ok im trying to create this routine
&lt;BR /&gt;public class Main {
&lt;BR /&gt; public static void main(String[] args) {
&lt;BR /&gt; String[] names = { "Jan vd Merwe", 
&lt;BR /&gt; "Piet Breedt (172.166.23.41)",
&lt;BR /&gt; "Jan vd Merwe (164.23.23.51)", 
&lt;BR /&gt; "Sarel Fourie (23.12.167.244)" };
&lt;BR /&gt; for (String name : names) {
&lt;BR /&gt; int parIndex = name.indexOf('(');
&lt;BR /&gt; if (parIndex != -1)
&lt;BR /&gt; name = name.substring(0, parIndex-1);
&lt;BR /&gt; System.out.println(name);
&lt;BR /&gt; }
&lt;BR /&gt; }
&lt;BR /&gt;}
&lt;BR /&gt;
&lt;BR /&gt;got some help from a buddy but he dissapeared on me, how would i change that to work with the a row as input and not the array.
&lt;BR /&gt;
&lt;BR /&gt;Thanx in advance</description>
      <pubDate>Sun, 14 Nov 2010 16:43:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/talend-trim-function/m-p/2242986#M29633</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-11-14T16:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: talend trim function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/talend-trim-function/m-p/2242987#M29634</link>
      <description>In talend left menu, where you create jobs, there is also "Code" folder, under it you right-click on routine and select "Create routine": 
&lt;BR /&gt;delete all content and paste following code into it: 
&lt;BR /&gt;package routines; 
&lt;BR /&gt;public class GetNameWithoutIP { 
&lt;BR /&gt; 
&lt;BR /&gt; public static String ReturnName(String name) { 
&lt;BR /&gt; // where do the space char between the name and IP address appears? 
&lt;BR /&gt; int delimiter = name.indexOf("("); 
&lt;BR /&gt; name = name.substring(0, delimiter-1); 
&lt;BR /&gt; System.out.println(name); 
&lt;BR /&gt; return name; 
&lt;BR /&gt; } 
&lt;BR /&gt;} 
&lt;BR /&gt;Name the routine in the same way as class name or it would not work. 
&lt;BR /&gt;Then use the routine as standard function of Talend on string column of each row. in the scenario there is tJavaRow used for demonstration, but you could call it everywhere in Talend, tMap expression, etc.</description>
      <pubDate>Sun, 14 Nov 2010 18:23:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/talend-trim-function/m-p/2242987#M29634</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-14T18:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: talend trim function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/talend-trim-function/m-p/2242988#M29635</link>
      <description>You could just use a tReplace component. It does a regular expressions search so use " \\((\\d\\.)+\\)" as your search string and replace with "".</description>
      <pubDate>Sun, 14 Nov 2010 22:20:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/talend-trim-function/m-p/2242988#M29635</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2010-11-14T22:20:32Z</dc:date>
    </item>
  </channel>
</rss>

