Delete data before loading from a table

Four Stars

Delete data before loading from a table

Hi,
I am loading data to a DB2 table using tDB2Output componet. In my target table already some data is present and I want to truncate the data before loading. In tDB2Output componet I have selected "Clear data in table". If I am correct, it will truncate the existing data table before loading new data. But I am getting following error if I use "Clear data in table".
I am using Java version.

Exception in component tDB2Output_1
com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -964, SQLSTATE: 57011, SQLERRMC: null
at com.ibm.db2.jcc.a.rf.e(rf.java:1680)
at com.ibm.db2.jcc.a.rf.b(rf.java:1207)
at com.ibm.db2.jcc.b.jb.i(jb.java:224)
at com.ibm.db2.jcc.b.jb.b(jb.java:50)
at com.ibm.db2.jcc.b.w.b(w.java:36)
at com.ibm.db2.jcc.b.cc.f(cc.java:149)
at com.ibm.db2.jcc.a.rf.m(rf.java:1204)
at com.ibm.db2.jcc.a.rf.a(rf.java:1984)
at com.ibm.db2.jcc.a.rf.c(rf.java:566)
at com.ibm.db2.jcc.a.rf.executeUpdate(rf.java:551)
at test_java.demo_staging_load.Demo_Staging_Load.tFileInputDelimited_1Process(Demo_Staging_Load.java:516)
at test_java.demo_staging_load.Demo_Staging_Load.runJob(Demo_Staging_Load.java:2316)
at test_java.demo_staging_load.Demo_Staging_Load.main(Demo_Staging_Load.java:2260)
Can any body suggest me how to truncate the data before loading new data?
Community Manager

Re: Delete data before loading from a table

Hi Rajendhar47
I have tested DB2 database on my computer and it run fine with TOS2.2.1. Which version of TOS did you use? Can you upload some screenshots about your job?
Best regard
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: Delete data before loading from a table

Hi Shong,
I am using 2.2.0 GA.
I am using following components.
tInputDelimited --> tMap --> tMap --> tUniqRow --> tMap --> tDB2Output.
First tMaps for cleaning up data and third tMap for mapping columns.
In tDB2Output, I have selected Action on data is "Insert" and selected Clear data in table.
Can you please suggest me?
Thanks..