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
Highlighted
Community Manager

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

Use "Truncate Table"

View solution in original post

Highlighted
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). 

View solution in original post

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.

View solution in original post


All Replies
Highlighted
Moderator

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
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
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).

Highlighted
Community Manager

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

Use "Truncate Table"

View solution in original post

Highlighted
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.

Highlighted
Community Manager

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

What error did you get?

Highlighted
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). 

View solution in original post

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.

View solution in original post

Highlighted
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.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog