• Index
  •  » Talend Open Studio for Data Integration » Installation
  •  » Unable to truncate table

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

ericblanchet
New member
Registered: 2007-05-15
Posts: 4

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 14:35:09

plegall
Member
Registered: 2006-09-19
Posts: 1586
Website

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 [Forum, topic 604] How to execute a "ALTER TABLE" ? (it's for tOracleRow but it's the same problem)

Truncate option will be added to Java DB Components in version 2.1 ([Bugtracker, bug 1102, fixed] [Java DB] Clear Table Option)

Offline

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

ericblanchet
New member
Registered: 2007-05-15
Posts: 4

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 15:11:15)

Offline

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

mhirt
Talend team
Registered: 2006-09-19
Posts: 1804

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

  • Index
  •  » Talend Open Studio for Data Integration » Installation
  •  » Unable to truncate table

Board footer

Powered by FluxBB