You are not logged in.

#1 2007-05-29 11:02:13

ericblanchet
Member
4 posts

Unable to truncate table

Hi,

I have a simple job for truncating a mysql table before loading with bulk function.
I use tMysqlRow with the query "truncate table mytable".
No error shows up but by table is not truncated.
I tried to force commit using "Commit every"=1.
Even tried "truncate table mytable;commit;" but no chance.

Using the command line tool mysql, same user, host, database, the truncate statment works perfectly.

Any idea ?
Maybe add a check box on the bulk loading component "truncate before loading" ?

Offline

#2 2007-05-29 13:35:09

plegall
Member
1586 posts

Re: Unable to truncate table

I assume that you have a 2.0.0 version.

This is a bug on Java tDBRow components which have been reported and corrected a few weeks ago.

Yopu can either upgrade (current version is 2.0.2) or follow instructions in http://www.talendforge.org/forum/viewtopic.php?id=604 (it's for tOracleRow but it's the same problem)

Truncate option will be added to Java DB Components in version 2.1 ([Bug] 1102)

Offline

#3 2007-05-29 13:54:02

ericblanchet
Member
4 posts

Re: Unable to truncate table

It works fine now, thanks

Another question: is there a way to force the creation of the table before loading ?
I mean, if the table does not exist, automate the creation ?

Last edited by ericblanchet (2007-05-29 14:11:15)

Offline

#4 2007-05-29 16:49:09

mhirt
Talend Team


Re: Unable to truncate table

Hello,

In Java, the tCreateTable will be available in 2.1.
This option is already available in Perl.

Best Regards,

Offline

Board footer