<?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: Removing question marks &amp;quot;?&amp;quot; in Talend in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293773#M66713</link>
    <description>&lt;P&gt;Have you tried something like row5.newColumn.replaceAll("\\?", "") ?&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jun 2017 15:25:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-23T15:25:52Z</dc:date>
    <item>
      <title>Removing question marks "?" in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293770#M66710</link>
      <description>&lt;P&gt;I have several rows which are entirely question marks. I am pasting some sample data below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;id	text
1328qdfjhase	This is a text
1038qdfjhase	???? ??  ????
1114qdfjhase	This is also text
1455qdfjhase	Another text
1376qdfjhase	Extra text&lt;/PRE&gt;
&lt;P&gt;I want to get rid of the second row as it only contains question mark and the data is of no use to me. I tried using tMap function EREPLACE function to replace the question marks to blank as&lt;/P&gt;
&lt;PRE&gt;StringHandling.EREPLACE(out3.text,"?","")&lt;/PRE&gt;
&lt;P&gt;and next i plan to filter the rows which are blank. However i am getting error at tMap component as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Exception in component tMap_1
java.util.regex.PatternSyntaxException: Dangling meta character '?' near index 0
?
^
	at java.util.regex.Pattern.error(Pattern.java:1955)
	at java.util.regex.Pattern.sequence(Pattern.java:2123)
	at java.util.regex.Pattern.expr(Pattern.java:1996)
	at java.util.regex.Pattern.compile(Pattern.java:1696)
	at java.util.regex.Pattern.&amp;lt;init&amp;gt;(Pattern.java:1351)
	at java.util.regex.Pattern.compile(Pattern.java:1028)
	at java.lang.String.replaceAll(String.java:2223)
	at routines.StringHandling.CHANGE(StringHandling.java:96)
	at routines.StringHandling.EREPLACE(StringHandling.java:189)
	at local_project.clean_crmjl2_0_1.Clean_CRMJL2.tFileInputExcel_1Process(Clean_CRMJL2.java:4743)
	at local_project.clean_crmjl2_0_1.Clean_CRMJL2.runJobInTOS(Clean_CRMJL2.java:7478)
	at local_project.clean_crmjl2_0_1.Clean_CRMJL2.main(Clean_CRMJL2.java:7335)&lt;/PRE&gt;
&lt;P&gt;Can anyone help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 12:00:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293770#M66710</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-23T12:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Removing question marks "?" in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293771#M66711</link>
      <description>&lt;P&gt;As the error message suggests, a question mark is a meta character in pattern strings. You get around this by escaping it. Because your String will be interpreted before being used as a pattern, you have to type "\\?"&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 13:58:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293771#M66711</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2017-06-23T13:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Removing question marks "?" in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293772#M66712</link>
      <description>&lt;P&gt;I tried that and its not removing the question marks row for me.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 14:29:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293772#M66712</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-23T14:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Removing question marks "?" in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293773#M66713</link>
      <description>&lt;P&gt;Have you tried something like row5.newColumn.replaceAll("\\?", "") ?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 15:25:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293773#M66713</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-23T15:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Removing question marks "?" in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293774#M66714</link>
      <description>&lt;P&gt;So, the string replacement will only make that value blank. &amp;nbsp;It won't remove the entire row from the data flow. &amp;nbsp;For that you'll need to filter using a tFilter component or a tMap. &amp;nbsp;If you trim() the text after replacing all of the question marks, you can set up an output filter like:&lt;/P&gt;
&lt;PRE&gt;!rowX.text.isEmpty()&lt;/PRE&gt;
&lt;P&gt;to only pass through records that aren't empty (assuming you don't have other empty values you want to preserve).&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 15:59:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293774#M66714</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2017-06-23T15:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Removing question marks "?" in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293775#M66715</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;HR /&gt;
 &lt;A href="https://community.qlik.com/s/profile/0053p000007LM5aAAG"&gt;@douglaszickuhr&lt;/A&gt; wrote:
 &lt;BR /&gt;
 &lt;P&gt;Have you tried something like row5.newColumn.replaceAll("\\?", "") ?&lt;/P&gt;
 &lt;HR /&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I am getting a new error as follows&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Exception in component tMap_1
java.lang.NullPointerException
	at local_project.clean_crmjl2_0_1.Clean_CRMJL2.tFileInputExcel_1Process(Clean_CRMJL2.java:4743)
	at local_project.clean_crmjl2_0_1.Clean_CRMJL2.runJobInTOS(Clean_CRMJL2.java:7477)
	at local_project.clean_crmjl2_0_1.Clean_CRMJL2.main(Clean_CRMJL2.java:7334)&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Jun 2017 16:25:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293775#M66715</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-23T16:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Removing question marks "?" in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293776#M66716</link>
      <description>&lt;P&gt;It seems that the value is null. Are you sure that you have value on that?&lt;/P&gt; 
&lt;P&gt;Are your components connected right?&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Paste here a screenshot of your job please. &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 16:35:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293776#M66716</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-23T16:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Removing question marks "?" in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293777#M66717</link>
      <description>&lt;P&gt;tMap is all you need:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LvC4.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148275i2FD1F4BFF7FD6C2A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LvC4.png" alt="0683p000009LvC4.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Here is the expression I used to filter output rows:&lt;/P&gt; 
&lt;PRE&gt;!(StringHandling.BTRIM(row109.text.replaceAll("\\?*", ""))).equals("")&lt;/PRE&gt; 
&lt;P&gt;StringHandling.BTRIM is here to remove extra blanks which included in the text if any.&lt;/P&gt; 
&lt;P&gt;And the result (remark the last line which contains "?" but also other characters, so the line is in the result:&lt;/P&gt; 
&lt;PRE&gt;Starting job test at 22:00 23/06/2017.&lt;BR /&gt;&lt;BR /&gt;[statistics] connecting to socket on port 3599&lt;BR /&gt;[statistics] connected&lt;BR /&gt;1328qdfjhase|This is a text&lt;BR /&gt;1114qdfjhase|This is also text&lt;BR /&gt;1455qdfjhase|Another text&lt;BR /&gt;1376qdfjhase|Extra text&lt;BR /&gt;999999999999|An extra ??? ?? ???? text to keep&lt;BR /&gt;[statistics] disconnected&lt;BR /&gt;Job test ended at 22:00 23/06/2017. [exit code=0]&lt;/PRE&gt; 
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 20:56:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293777#M66717</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-06-23T20:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Removing question marks "?" in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293778#M66718</link>
      <description>&lt;A href="https://community.qlik.com/s/profile/0053p000007LLqvAAG"&gt;@Enthusiast&lt;/A&gt;, does this helps or not?
&lt;BR /&gt;Please, let us know and mark the case as solved if it is.</description>
      <pubDate>Mon, 26 Jun 2017 22:40:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293778#M66718</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-06-26T22:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Removing question marks "?" in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293779#M66719</link>
      <description>&lt;P&gt;Sorry, i was on vacation.&amp;nbsp;I don't know why but instead this worked in tMap expression builder. I think issue was something else, not sure what though. I am now taking the input from excel files instead of CSV. could be because of encoding?&lt;/P&gt; 
&lt;PRE&gt;StringHandling.EREPLACE(out3.text,"?","")&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 09:42:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Removing-question-marks-quot-quot-in-Talend/m-p/2293779#M66719</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-28T09:42:15Z</dc:date>
    </item>
  </channel>
</rss>

