Clear table - Action on table doesnt work for toutput component for oracle db

Highlighted
Five Stars

Clear table - Action on table doesnt work for toutput component for oracle db

Hello Guys,

 

I am need to Talend ETL, Can anyone help me to clear the table before inserting the record using toutput component for oracle db. I tried the action on the table , chose the 'Clear table' option. When I ran the job, it takes forever to run and it didn't do anything?

 

Thanks,


Accepted Solutions
Sixteen Stars

Re: Clear table - Action on table doesnt work for toutput component for oracle db

Use "Truncate Table"

Five Stars

Re: Clear table - Action on table doesnt work for toutput component for oracle db

Here you go, It needs a little bit of Oracle DB knowledge for DELETE vs TRUNCATE to understand this.

Clear table --> This will run a DELETE statement on your table and it will be time consuming based on your data. For DELETE oracle will keep a copy of your data until you commit/rollback the transaction.

 

So, I would recommend you to use either Truncate table(I would prefer this) or Drop and create table(with this option you might loose all the grants on the table). 

Five Stars

Re: Clear table - Action on table doesnt work for toutput component for oracle db

Thank you all for your time, I noticed it is because of the View(which has all the access to delete , update, insert) but still was not working. I changed the view to table then Clear, Truncate and everything started working.


All Replies
Thirteen Stars

Re: Clear table - Action on table doesnt work for toutput component for oracle db

@kal_2018,which version of Talend are you using? can you restart your machine and try?

Manohar B
Five Stars

Re: Clear table - Action on table doesnt work for toutput component for oracle db

I am using Talend Open Studion for Data Integration (7.0.1).

Sixteen Stars

Re: Clear table - Action on table doesnt work for toutput component for oracle db

Use "Truncate Table"

Five Stars

Re: Clear table - Action on table doesnt work for toutput component for oracle db

I did try Truncate table and Truncate table with resuable storage. It throws error as well. Do you guys know why clearing the table option takes so much time and it seems that it is not working.

Sixteen Stars

Re: Clear table - Action on table doesnt work for toutput component for oracle db

What error did you get?

Five Stars

Re: Clear table - Action on table doesnt work for toutput component for oracle db

Here you go, It needs a little bit of Oracle DB knowledge for DELETE vs TRUNCATE to understand this.

Clear table --> This will run a DELETE statement on your table and it will be time consuming based on your data. For DELETE oracle will keep a copy of your data until you commit/rollback the transaction.

 

So, I would recommend you to use either Truncate table(I would prefer this) or Drop and create table(with this option you might loose all the grants on the table). 

Five Stars

Re: Clear table - Action on table doesnt work for toutput component for oracle db

Thank you all for your time, I noticed it is because of the View(which has all the access to delete , update, insert) but still was not working. I changed the view to table then Clear, Truncate and everything started working.

Five Stars

Re: Clear table - Action on table doesnt work for toutput component for oracle db

Thanks @rhall_2_0 for your time, I guess it is because of the view.