<?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 tMap replace character if column is not null in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tMap-replace-character-if-column-is-not-null/m-p/2375528#M137933</link>
    <description>&lt;P&gt;The data is writing out like this ["PII"].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to remove the [""] and convert it to PII.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In tMap, I have this expression: &lt;/P&gt;&lt;P&gt;(row14.LABELS!=null &amp;amp;&amp;amp; row14.LABELS="" &amp;amp;&amp;amp; StringHandling.TRIM(row14.LABELS).length() &amp;gt; 0)?row14.LABELS.replaceAll("[", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the job, I am getting the hard error of Detail Message: aggregated_row_tAggregateRow_1 cannot be resolved to a variable.&lt;/P&gt;&lt;P&gt;What am I doing wrong in the above expression? Can I please have an example of how to replace those characters I don't want with blanks if there's data. This column data can be null. &lt;/P&gt;</description>
    <pubDate>Wed, 19 Aug 2020 18:48:54 GMT</pubDate>
    <dc:creator>Edith1</dc:creator>
    <dc:date>2020-08-19T18:48:54Z</dc:date>
    <item>
      <title>tMap replace character if column is not null</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-replace-character-if-column-is-not-null/m-p/2375528#M137933</link>
      <description>&lt;P&gt;The data is writing out like this ["PII"].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to remove the [""] and convert it to PII.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In tMap, I have this expression: &lt;/P&gt;&lt;P&gt;(row14.LABELS!=null &amp;amp;&amp;amp; row14.LABELS="" &amp;amp;&amp;amp; StringHandling.TRIM(row14.LABELS).length() &amp;gt; 0)?row14.LABELS.replaceAll("[", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the job, I am getting the hard error of Detail Message: aggregated_row_tAggregateRow_1 cannot be resolved to a variable.&lt;/P&gt;&lt;P&gt;What am I doing wrong in the above expression? Can I please have an example of how to replace those characters I don't want with blanks if there's data. This column data can be null. &lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 18:48:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-replace-character-if-column-is-not-null/m-p/2375528#M137933</guid>
      <dc:creator>Edith1</dc:creator>
      <dc:date>2020-08-19T18:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: tMap replace character if column is not null</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-replace-character-if-column-is-not-null/m-p/2375529#M137934</link>
      <description>&lt;P&gt;Youll have to escape all double quotes and brackets. The following worked for me:&lt;/P&gt;&lt;P&gt;row14.LABELS != null ? row14.LABELS.replaceAll("[\\[\\]\"]","") : null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are probably getting that error because you're using an assignment operator '=' when you should be using an equality operator '==' in your conditional. (fyi use '==' for object comparisons and .equals() method for string comparison)  If all you need to check is for nulls, my conditional should be sufficient.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 19:44:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-replace-character-if-column-is-not-null/m-p/2375529#M137934</guid>
      <dc:creator>evansdar</dc:creator>
      <dc:date>2020-08-19T19:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: tMap replace character if column is not null</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-replace-character-if-column-is-not-null/m-p/2375530#M137935</link>
      <description>&lt;P&gt;Thank you so much for your help &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;. This worked. I also appreciate the explanation on when to use == or .equal. I am new to all this. &lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 20:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-replace-character-if-column-is-not-null/m-p/2375530#M137935</guid>
      <dc:creator>Edith1</dc:creator>
      <dc:date>2020-08-19T20:34:59Z</dc:date>
    </item>
  </channel>
</rss>

