Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Vijayakanth_Devaram
Contributor
Contributor

tSQLTemplateMerge returns -1 on NB_LINE for teradata

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.

Job has two components.

tDBConnection -> tJava

tJava:

java.sql.Connection myconn = (java.sql.Connection) globalMap.get("conn_tDBConnection_1");

java.sql.Statement mystmt = myconn.createStatement();

String mystr = "INSERT INTO EMP (EMPNO) VALUES (201)";

mystmt.addBatch(mystr);

mystmt.executeBatch();

System.out.print(mystmt.getUpdateCount());

Labels (5)
1 Reply
Anonymous
Not applicable

Hello,

Could you please post your job design screenshot here? On which talend build version you got this issue?

Best regards

Sabrina