<?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 tSQLTemplateMerge returns -1 on NB_LINE for teradata in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-returns-1-on-NB-LINE-for-teradata/m-p/2315387#M86044</link>
    <description>&lt;P&gt;I want to use the tSQLTemplateMerge component to load data from stage to target table. Stage and Target have the same table structure. Only new records should be inserted based on matching few columns. tSQLTemplateMerge works great for the purpose and I will be able to use this for 100s of similar jobs where I just need change the repositary table and matching column. The only issue I am facing is the component's output variable tSQLTemplateMerge_1_NB_LINE always returns -1 instead of the actual row count even when there are number of rows inserted into the table. The target database is teradata. I have used simpliied mockup code in a tJava and it returns -1 for Teradata, but 1 for MySQL database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Job has two components.&lt;/P&gt;&lt;P&gt;tDBConnection -&amp;gt; tJava&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tJava:&lt;/P&gt;&lt;P&gt;java.sql.Connection myconn = (java.sql.Connection) globalMap.get("conn_tDBConnection_1");&lt;/P&gt;&lt;P&gt;java.sql.Statement mystmt = myconn.createStatement();&lt;/P&gt;&lt;P&gt;String mystr = "INSERT INTO EMP (EMPNO) VALUES (201)";&lt;/P&gt;&lt;P&gt;mystmt.addBatch(mystr);&lt;/P&gt;&lt;P&gt;mystmt.executeBatch();&lt;/P&gt;&lt;P&gt;System.out.print(mystmt.getUpdateCount());&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>Sat, 16 Nov 2024 00:54:38 GMT</pubDate>
    <dc:creator>Vijayakanth_Devaram</dc:creator>
    <dc:date>2024-11-16T00:54:38Z</dc:date>
    <item>
      <title>tSQLTemplateMerge returns -1 on NB_LINE for teradata</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-returns-1-on-NB-LINE-for-teradata/m-p/2315387#M86044</link>
      <description>&lt;P&gt;I want to use the tSQLTemplateMerge component to load data from stage to target table. Stage and Target have the same table structure. Only new records should be inserted based on matching few columns. tSQLTemplateMerge works great for the purpose and I will be able to use this for 100s of similar jobs where I just need change the repositary table and matching column. The only issue I am facing is the component's output variable tSQLTemplateMerge_1_NB_LINE always returns -1 instead of the actual row count even when there are number of rows inserted into the table. The target database is teradata. I have used simpliied mockup code in a tJava and it returns -1 for Teradata, but 1 for MySQL database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Job has two components.&lt;/P&gt;&lt;P&gt;tDBConnection -&amp;gt; tJava&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tJava:&lt;/P&gt;&lt;P&gt;java.sql.Connection myconn = (java.sql.Connection) globalMap.get("conn_tDBConnection_1");&lt;/P&gt;&lt;P&gt;java.sql.Statement mystmt = myconn.createStatement();&lt;/P&gt;&lt;P&gt;String mystr = "INSERT INTO EMP (EMPNO) VALUES (201)";&lt;/P&gt;&lt;P&gt;mystmt.addBatch(mystr);&lt;/P&gt;&lt;P&gt;mystmt.executeBatch();&lt;/P&gt;&lt;P&gt;System.out.print(mystmt.getUpdateCount());&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>Sat, 16 Nov 2024 00:54:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-returns-1-on-NB-LINE-for-teradata/m-p/2315387#M86044</guid>
      <dc:creator>Vijayakanth_Devaram</dc:creator>
      <dc:date>2024-11-16T00:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: tSQLTemplateMerge returns -1 on NB_LINE for teradata</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-returns-1-on-NB-LINE-for-teradata/m-p/2315388#M86045</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Could you please post your job design screenshot here? On which talend build version you got this issue?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Thu, 24 Dec 2020 06:42:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-returns-1-on-NB-LINE-for-teradata/m-p/2315388#M86045</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-24T06:42:50Z</dc:date>
    </item>
  </channel>
</rss>

