How to clear / truncate a table without doing an insert?

Highlighted
One Star

How to clear / truncate a table without doing an insert?

I have a job where I want to clear the destination MySQL table at the start of the whole job. I can't use the "Clear table" action-on-table setting on the MySQL output component because the job iterates through a series of inserts, and if I use that then each insert also clears the results of the previous inserts in *this* execution (I am only trying to clear the results of *previous* executions). Please see the attached pic for a clearer explanation.
So basically, how can I easily clear the entire table before I even start?
Any help much appreciated.
One Star

Re: How to clear / truncate a table without doing an insert?

Actually don't worry, I figured it out ... you use the tMysqlRow component to just execute arbitrary SQL with a "truncate" statement in it.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.