[resolved] Truncate table from job design

One Star

[resolved] Truncate table from job design

Hi ALL,
I just wonder, how do i wants to truncate table from job design? My plan is, i wants to truncate all data from table A before i load the new fresh data into it.

Plz help me.....thanks in advance Smiley Happy

Accepted Solutions
Six Stars

Re: [resolved] Truncate table from job design

Hi,
Think selecting the Action on Table as Truncate and leaving the Action on Data as Insert would help on the tXXXOutput component.
cheers

All Replies
Community Manager

Re: [resolved] Truncate table from job design

Hi
Just use txxxRow component to execute a truncate statement to truncate the table before loading new data.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Truncate table from job design

Hi,
I wanted to try truncate the table by using txxxRow, but i can see it only can cater for one-by-one table. I wanted to truncate more than one table. How was it?

Regards,
Six Stars

Re: [resolved] Truncate table from job design

Hi,
Think selecting the Action on Table as Truncate and leaving the Action on Data as Insert would help on the tXXXOutput component.
cheers
Community Manager

Re: [resolved] Truncate table from job design

Hi,
I wanted to try truncate the table by using txxxRow, but i can see it only can cater for one-by-one table. I wanted to truncate more than one table. How was it?

Regards,

If the tables' name which you want to truncate are in a file, you can read this file, then iterate each table name and pass it to tOracleRow one by one. If the tables are in a same database, use tTableList to iterate each table and pass it to tOracleRow one by one.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Truncate table from job design

Hi pravinkumarbandi,
Thanks for your idea. I've tested and indeed it worked.

Hi Shong,
I try to apply your ideas but i didn't really get Smiley Happy
Appreciate if you can give any screen shots for both method.

Regards
Community Manager

Re: [resolved] Truncate table from job design

Hi
I take an example to explain how to use tOracleTableList to iterate each table and truncate it one by one on tOracleRow.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business