<?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: Substring in Talend in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375980#M138265</link>
    <description>&lt;P&gt;You are dealing with String data (text). You need to convert it to an Integer before you can carry out numeric calculations with it. You need to "cast" your String values to int values. Take a look here:&amp;nbsp;&lt;A href="https://www.mkyong.com/java/java-convert-string-to-int/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.mkyong.com/java/java-convert-string-to-int/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But in your scenario you need to do something like this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Integer.parseInt(((String[])Var.var1)[0]) * 16777216&lt;/PRE&gt;&lt;P&gt;This was actually a different question to the titled question. You should have really raised a different question as it can get confusing when multiple questions are raised under a misleading title.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jun 2018 15:52:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-06-12T15:52:51Z</dc:date>
    <item>
      <title>Substring in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375972#M138257</link>
      <description>&lt;P&gt;22.33.442.555.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to get each value separated which is separated by dot&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ip1 = 22&lt;/P&gt;&lt;P&gt;ip2 = 33&amp;nbsp;&lt;/P&gt;&lt;P&gt;ip3 = 442&lt;/P&gt;&lt;P&gt;ip 4 = 555&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 22:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375972#M138257</guid>
      <dc:creator>Karuetl</dc:creator>
      <dc:date>2018-06-11T22:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Substring in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375973#M138258</link>
      <description>tExtractRegexFields&lt;BR /&gt;&lt;A href="https://help.talend.com/reader/jomWd_GKqAmTZviwG_oxHQ/gDLE3n7ZkrbHVl8Joqu1HA" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/jomWd_GKqAmTZviwG_oxHQ/gDLE3n7ZkrbHVl8Joqu1HA&lt;/A&gt;</description>
      <pubDate>Tue, 12 Jun 2018 05:32:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375973#M138258</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-06-12T05:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Substring in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375974#M138259</link>
      <description>&lt;P&gt;In a file i have data as below , it is comma delimited .&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;111.5689.7.0,9.56.783.21,"XX","05","Glen","5004"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the first column is&amp;nbsp;&lt;SPAN&gt;111.&lt;/SPAN&gt;&lt;SPAN&gt;5689&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;0 so i need to get each value which is separated by dot&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 14:10:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375974#M138259</guid>
      <dc:creator>Karuetl</dc:creator>
      <dc:date>2018-06-12T14:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Substring in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375975#M138260</link>
      <description>&lt;P&gt;You can use a basic Java String method for this called "split". It is described here....&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html#split-java.lang.String-" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.oracle.com/javase/9/docs/api/java/lang/String.html#split-java.lang.String-&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But as an example, if your column is called "value" and your row is called "row1", you would use it like this....&lt;/P&gt;&lt;PRE&gt;String[] splitVals = row1.value.split("\\.");&lt;/PRE&gt;&lt;P&gt;You can then retrieve the values using the String[] like below....&lt;/P&gt;&lt;PRE&gt;String firstToken = splitVals[0];
String secondToken = splitVals[1];
String thirdToken = splitVals[2];&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jun 2018 14:33:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375975#M138260</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-12T14:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Substring in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375976#M138261</link>
      <description>&lt;P&gt;I am trying to achieve using tmap component&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 14:36:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375976#M138261</guid>
      <dc:creator>Karuetl</dc:creator>
      <dc:date>2018-06-12T14:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Substring in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375977#M138262</link>
      <description>&lt;P&gt;basically trying to get the position number of the nth occurence of the character in a string&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;111.&lt;/SPAN&gt;&lt;SPAN&gt;5689&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;first dot&amp;nbsp;should return position = 4&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;second dot should return&amp;nbsp; position&amp;nbsp;=&amp;nbsp; 9&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;third dot should return position = 11&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 14:42:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375977#M138262</guid>
      <dc:creator>Karuetl</dc:creator>
      <dc:date>2018-06-12T14:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Substring in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375978#M138263</link>
      <description>&lt;P&gt;The method I gave you will work. You do not need to know where the "." is. In a tMap variable (of&amp;nbsp;class Object), out this code....&lt;/P&gt;&lt;PRE&gt;row1.value.split("\\.") &lt;/PRE&gt;&lt;P&gt;Then in your tMap output table, retrieve the values in their respective columns like this...&lt;/P&gt;&lt;PRE&gt;((String[])Var.myObjectVariable)[0] 
((String[])Var.myObjectVariable)[1] 
((String[])Var.myObjectVariable)[2] 
((String[])Var.myObjectVariable)[3] &lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jun 2018 14:54:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375978#M138263</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-12T14:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: Substring in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375979#M138264</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After getting each value i tried below , but compilation failed&amp;nbsp;&lt;/P&gt;&lt;P&gt;Detail Message: The operator * is undefined for the argument type(s) String, int&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(((String[])Var.var1)[0] * 16777216) + (((String[])Var.var1)[1] * 65536) + (((String[])Var.var1)[2] * 256 ) + (((String[])Var.var1)[3])&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 15:34:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375979#M138264</guid>
      <dc:creator>Karuetl</dc:creator>
      <dc:date>2018-06-12T15:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Substring in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375980#M138265</link>
      <description>&lt;P&gt;You are dealing with String data (text). You need to convert it to an Integer before you can carry out numeric calculations with it. You need to "cast" your String values to int values. Take a look here:&amp;nbsp;&lt;A href="https://www.mkyong.com/java/java-convert-string-to-int/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.mkyong.com/java/java-convert-string-to-int/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But in your scenario you need to do something like this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Integer.parseInt(((String[])Var.var1)[0]) * 16777216&lt;/PRE&gt;&lt;P&gt;This was actually a different question to the titled question. You should have really raised a different question as it can get confusing when multiple questions are raised under a misleading title.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 15:52:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375980#M138265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-12T15:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Substring in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375981#M138266</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried but result is not correct&amp;nbsp;&lt;/P&gt;&lt;P&gt;example&amp;nbsp;&lt;/P&gt;&lt;P&gt;217.233.0.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;217 *&amp;nbsp;16777216 =&amp;nbsp;&lt;SPAN&gt;3640655872&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but output from talend is as =&amp;nbsp; -654311424&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 18:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375981#M138266</guid>
      <dc:creator>Karuetl</dc:creator>
      <dc:date>2018-06-12T18:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Substring in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375982#M138267</link>
      <description>&lt;P&gt;You are working with an int. An int's max size is 4 bytes or 32 bits. This equates to a range of&amp;nbsp;&lt;SPAN&gt;−2,147,483,648 to 2,147,483,647. This is why your number is wrong. You&amp;nbsp;should probably work with BigDecimals to work with calculations this big.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 23:33:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Substring-in-Talend/m-p/2375982#M138267</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-12T23:33:49Z</dc:date>
    </item>
  </channel>
</rss>

