<?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 - Tdbouptut], Update only field if it is not null in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Tmap-Tdbouptut-Update-only-field-if-it-is-not-null/m-p/2298906#M71310</link>
    <description>&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to update fields in my database if the value is not null. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000QF4jxAAD.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153315i089F16A70EB55423/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000QF4jxAAD.png" alt="0695b00000QF4jxAAD.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In &lt;/P&gt;&lt;B&gt;Target&lt;/B&gt;&lt;P&gt;  I have already these values : &lt;/P&gt; {Id : 3, Name : GUEST, &lt;B&gt;First_name: Hope&lt;/B&gt;,  Age:3} &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In&lt;B&gt; Input&lt;/B&gt; : I have &lt;/P&gt;&lt;P&gt; {Id : 3, Name : GUEST,  &lt;/P&gt;&lt;B&gt;First_name: ""&lt;/B&gt;&lt;P&gt;,  &lt;/P&gt;&lt;B&gt;Age:6&lt;/B&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally after the update I should have {Id : 3, Name : GUEST, &lt;/P&gt;&lt;B&gt;First_name: Hope , Age:6&lt;/B&gt;&lt;P&gt;} but I have :  {Id : 3, Name : GUEST,  &lt;/P&gt;&lt;B&gt;First_name: "",  Age:6&lt;/B&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first name was updated by a null value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that the first name field can be nulled.  If I check Nullable in tmap and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have in target  {Id : 3, Name : GUEST, &lt;/P&gt;&lt;B&gt;First_name: "",  Age:3&lt;/B&gt;&lt;P&gt;}  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and INPUT ;  {Id : 3, Name : GUEST,&lt;/P&gt;&lt;B&gt; First_name: "",  Age:6&lt;/B&gt;&lt;P&gt; }   I will have &lt;/P&gt;&lt;B&gt;nullpointer error. &lt;/B&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Apr 2022 15:06:16 GMT</pubDate>
    <dc:creator>Vivi2</dc:creator>
    <dc:date>2022-04-27T15:06:16Z</dc:date>
    <item>
      <title>[Tmap - Tdbouptut], Update only field if it is not null</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-Tdbouptut-Update-only-field-if-it-is-not-null/m-p/2298906#M71310</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to update fields in my database if the value is not null. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000QF4jxAAD.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153315i089F16A70EB55423/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000QF4jxAAD.png" alt="0695b00000QF4jxAAD.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In &lt;/P&gt;&lt;B&gt;Target&lt;/B&gt;&lt;P&gt;  I have already these values : &lt;/P&gt; {Id : 3, Name : GUEST, &lt;B&gt;First_name: Hope&lt;/B&gt;,  Age:3} &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In&lt;B&gt; Input&lt;/B&gt; : I have &lt;/P&gt;&lt;P&gt; {Id : 3, Name : GUEST,  &lt;/P&gt;&lt;B&gt;First_name: ""&lt;/B&gt;&lt;P&gt;,  &lt;/P&gt;&lt;B&gt;Age:6&lt;/B&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally after the update I should have {Id : 3, Name : GUEST, &lt;/P&gt;&lt;B&gt;First_name: Hope , Age:6&lt;/B&gt;&lt;P&gt;} but I have :  {Id : 3, Name : GUEST,  &lt;/P&gt;&lt;B&gt;First_name: "",  Age:6&lt;/B&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first name was updated by a null value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that the first name field can be nulled.  If I check Nullable in tmap and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have in target  {Id : 3, Name : GUEST, &lt;/P&gt;&lt;B&gt;First_name: "",  Age:3&lt;/B&gt;&lt;P&gt;}  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and INPUT ;  {Id : 3, Name : GUEST,&lt;/P&gt;&lt;B&gt; First_name: "",  Age:6&lt;/B&gt;&lt;P&gt; }   I will have &lt;/P&gt;&lt;B&gt;nullpointer error. &lt;/B&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 15:06:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-Tdbouptut-Update-only-field-if-it-is-not-null/m-p/2298906#M71310</guid>
      <dc:creator>Vivi2</dc:creator>
      <dc:date>2022-04-27T15:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: [Tmap - Tdbouptut], Update only field if it is not null</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-Tdbouptut-Update-only-field-if-it-is-not-null/m-p/2298907#M71311</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;The result is normal output, all fields will be updated if the key exists, there is no option that we can configure the filed to be not updated if it is null. The workaround for this issue is doing an inner join with target data base on key column id, eg:&lt;/P&gt;&lt;P&gt;input--main(row1)--tMap--out1--target&lt;/P&gt;&lt;P&gt;                                 |lookup(row2)&lt;/P&gt;&lt;P&gt;                             target &lt;/P&gt;&lt;P&gt;set the expression of name column in the output table of tMap like:&lt;/P&gt;&lt;P&gt;row1.name==null?row2.name:row1.name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The field will use target's value if the source value is null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong                    &lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 02:26:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-Tdbouptut-Update-only-field-if-it-is-not-null/m-p/2298907#M71311</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-28T02:26:28Z</dc:date>
    </item>
  </channel>
</rss>

