<?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: How to Join a String with substring values if substring scan matches? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-Join-a-String-with-substring-values-if-substring-scan/m-p/2254717#M37637</link>
    <description>Hi,&lt;BR /&gt;the text in the pictures is not readable. Can you post your filter and join code as text? &lt;BR /&gt;Which error do you get?&lt;BR /&gt;I'm not sure but do you really use in the upper filter the findInString function with two literals? This would make no sense. But, how I said, it is bad readable so it could be a different.&lt;BR /&gt;Bye&lt;BR /&gt;Volker</description>
    <pubDate>Fri, 26 Sep 2008 22:27:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-09-26T22:27:28Z</dc:date>
    <item>
      <title>How to Join a String with substring values if substring scan matches?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Join-a-String-with-substring-values-if-substring-scan/m-p/2254713#M37633</link>
      <description>I have a data source (CSV schema DS1) and  another data source(DS2: reference values).&lt;BR /&gt;I need to iterate throw the reference data rows (DS2) to chek if I find a match with a scan of DS1.&lt;BR /&gt;The scan operation is done by a custom code routine that does an implementation of the SCANNER java class. the routine getSubstringInString(WholeString, Mysubstring) return null or Mysubstring if scan is OK.&lt;BR /&gt;I thought I could use a tMap component and do an inner join with specific conditions on both string. &lt;BR /&gt;&amp;lt;Util.getSubstringInString(row5.WholeString, row6.Mysubstring).matches(row6.Mysubstring)&amp;gt;&lt;BR /&gt;and set a default value &amp;lt;UNKNOWN&amp;gt; in case of reject (no match in any rows)&lt;BR /&gt;But either the tmap doesnt' allow these kind of setting or I got a failure at execution.&lt;BR /&gt;Any help would be appreciated.</description>
      <pubDate>Sat, 16 Nov 2024 14:13:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Join-a-String-with-substring-values-if-substring-scan/m-p/2254713#M37633</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to Join a String with substring values if substring scan matches?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Join-a-String-with-substring-values-if-substring-scan/m-p/2254714#M37634</link>
      <description>Hi,
&lt;BR /&gt;can you give us a screen shot of the mapping in tMap and more information about your routine and the error you get. 
&lt;BR /&gt;Without this information I could only guess:
&lt;BR /&gt;If your routine getSubstringInString returns null if if does not match you would get a NullPointerException with ".matches()". You should first check the result and only if it is not null check with match. 
&lt;BR /&gt;By the way: If this function returns your substring, the match make no sense. Or?
&lt;BR /&gt;Bye
&lt;BR /&gt;Volker</description>
      <pubDate>Thu, 25 Sep 2008 21:07:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Join-a-String-with-substring-values-if-substring-scan/m-p/2254714#M37634</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-25T21:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to Join a String with substring values if substring scan matches?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Join-a-String-with-substring-values-if-substring-scan/m-p/2254715#M37635</link>
      <description>Hi,&lt;BR /&gt;the routine code is&lt;BR /&gt;	   public static boolean findInString(String strToLookIn, String strToScan) {&lt;BR /&gt;	        boolean result = false;&lt;BR /&gt;	        String strScan=null;&lt;BR /&gt;	        Scanner sc = new Scanner(strToLookIn);&lt;BR /&gt;	        strScan= sc.findInLine(strToScan);&lt;BR /&gt;	        if (strScan!=null)&lt;BR /&gt;	        	result=true;&lt;BR /&gt;	        sc.close();&lt;BR /&gt;	        &lt;BR /&gt;	        return result;&lt;BR /&gt;	    }&lt;BR /&gt;	   public static String getSubstringInString(String strToLookIn, String strToScan) {&lt;BR /&gt;	        String strScan=null;&lt;BR /&gt;	        Scanner sc = new Scanner(strToLookIn);&lt;BR /&gt;	        strScan= sc.findInLine(strToScan);&lt;BR /&gt;	 		&lt;BR /&gt;	        sc.close();&lt;BR /&gt;	        &lt;BR /&gt;	        return strScan;&lt;BR /&gt;	    }	   &lt;BR /&gt;The images enclosed show the job purpose and a tMap view of what I wish to do.&lt;BR /&gt;If I set filter in the output, that works with &lt;BR /&gt;Util.findInString("ABC", "B")  || Util.findInString("ABCD", "BC") || ... that could be a very long string loaded in context&lt;BR /&gt;but this doenst'give a very clear view as a tMap schema could do. And I shoud set the filter twice to get rejected data (NotInFirstFilterList) to look for in the next filterList, ...&lt;BR /&gt;When I used these kind of filters, it takes 30 minutes to parse 1 000 000 000 rows (tFileList).&lt;BR /&gt;As the error is concerned it was an error access to "row6.Libelle" in the join sequence Util.getSubstringInString(row5.Libelle, row6.Libelle)==row6.Libelle.&lt;BR /&gt;I would rather do a join between both datasources. I'm looking for ideas.&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;Jnb</description>
      <pubDate>Fri, 26 Sep 2008 10:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Join-a-String-with-substring-values-if-substring-scan/m-p/2254715#M37635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-26T10:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to Join a String with substring values if substring scan matches?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Join-a-String-with-substring-values-if-substring-scan/m-p/2254716#M37636</link>
      <description>I had trouble with image posting.&lt;BR /&gt;After set of new dimension, I could only post one image at a time.&lt;BR /&gt;So here's the second image.</description>
      <pubDate>Fri, 26 Sep 2008 10:18:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Join-a-String-with-substring-values-if-substring-scan/m-p/2254716#M37636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-26T10:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Join a String with substring values if substring scan matches?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Join-a-String-with-substring-values-if-substring-scan/m-p/2254717#M37637</link>
      <description>Hi,&lt;BR /&gt;the text in the pictures is not readable. Can you post your filter and join code as text? &lt;BR /&gt;Which error do you get?&lt;BR /&gt;I'm not sure but do you really use in the upper filter the findInString function with two literals? This would make no sense. But, how I said, it is bad readable so it could be a different.&lt;BR /&gt;Bye&lt;BR /&gt;Volker</description>
      <pubDate>Fri, 26 Sep 2008 22:27:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Join-a-String-with-substring-values-if-substring-scan/m-p/2254717#M37637</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-26T22:27:28Z</dc:date>
    </item>
  </channel>
</rss>

