<?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 Null values passed to tDBRow prepared statements in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Null-values-passed-to-tDBRow-prepared-statements/m-p/2366339#M129841</link>
    <description>&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;Is there any way that I can use NULL in a tDBRow prepared statement as Int or String parameter value?&lt;/P&gt;&lt;P&gt;Every time I pass a null as a parameter value it throws back null pointer exception.&lt;/P&gt;&lt;P&gt;I use Talend Open Studio for Big Data 7.3.1&lt;/P&gt;&lt;P&gt;Looks like auto generated code is designed just for Date type parameters:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000IeDxwAAF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133933i41CE37AB679E9107/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000IeDxwAAF.png" alt="0695b00000IeDxwAAF.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Why is that so?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Grzegorz&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 23:44:37 GMT</pubDate>
    <dc:creator>GKarg</dc:creator>
    <dc:date>2024-11-15T23:44:37Z</dc:date>
    <item>
      <title>Null values passed to tDBRow prepared statements</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-values-passed-to-tDBRow-prepared-statements/m-p/2366339#M129841</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;Is there any way that I can use NULL in a tDBRow prepared statement as Int or String parameter value?&lt;/P&gt;&lt;P&gt;Every time I pass a null as a parameter value it throws back null pointer exception.&lt;/P&gt;&lt;P&gt;I use Talend Open Studio for Big Data 7.3.1&lt;/P&gt;&lt;P&gt;Looks like auto generated code is designed just for Date type parameters:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000IeDxwAAF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133933i41CE37AB679E9107/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000IeDxwAAF.png" alt="0695b00000IeDxwAAF.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Why is that so?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Grzegorz&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:44:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-values-passed-to-tDBRow-prepared-statements/m-p/2366339#M129841</guid>
      <dc:creator>GKarg</dc:creator>
      <dc:date>2024-11-15T23:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Null values passed to tDBRow prepared statements</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-values-passed-to-tDBRow-prepared-statements/m-p/2366340#M129842</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;What does your prepared statement look like?&lt;/P&gt;&lt;P&gt;Have you tried to set all the null values to an empty string "" in a tDBRow prepared statement as String parameter value?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 02:48:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-values-passed-to-tDBRow-prepared-statements/m-p/2366340#M129842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-16T02:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Null values passed to tDBRow prepared statements</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-values-passed-to-tDBRow-prepared-statements/m-p/2366341#M129843</link>
      <description>&lt;P&gt;Thanks Sabrina - it worked! I just had to cast these values in the query back to int like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;INSERT INTO _kafka_fos_raw_log (...)&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;VALUES (?,?,?,?,?,?,?,?,?,?,?,?::int,?::int,?::int,?::int,?::int,?::int,?::int,?::int,?::int,?::int)&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;ON CONFLICT ON CONSTRAINT unique_raw_log DO NOTHING;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's a bit sketchy and I wonder how much it affects performance, but such workaround works fine.&lt;/P&gt;&lt;P&gt;I think the best solution of my problem would be to have the option "on conflict do something" in the postgres tDBInput component because that's why I'm using dbrow instead of dbinput.&lt;/P&gt;&lt;P&gt;Anyway, big thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Grzegorz&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 11:26:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-values-passed-to-tDBRow-prepared-statements/m-p/2366341#M129843</guid>
      <dc:creator>GKarg</dc:creator>
      <dc:date>2021-09-16T11:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Null values passed to tDBRow prepared statements</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-values-passed-to-tDBRow-prepared-statements/m-p/2366342#M129844</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Great it works. Indeed, it is a bit sketchy. I will make a discussion with our manager to see if there is any better solution.&lt;/P&gt;&lt;P&gt;It seems the option "on conflict do something" to be a work item/new feature.&lt;/P&gt;&lt;P&gt;Feel free to raise a jira issue on talend bug tracker about it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://jira.talendforge.org/secure/Dashboard.jspa" alt="https://jira.talendforge.org/secure/Dashboard.jspa" target="_blank"&gt;https://jira.talendforge.org/secure/Dashboard.jspa&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 02:30:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-values-passed-to-tDBRow-prepared-statements/m-p/2366342#M129844</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-17T02:30:36Z</dc:date>
    </item>
  </channel>
</rss>

