Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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());
Hello,
Could you please post your job design screenshot here? On which talend build version you got this issue?
Best regards
Sabrina