Forum Discussion
You can use the Mapper Snap.
If you put the source fields in the source column and do not specify a target for those fields, it will drop them in the data flow.
- Siva_Venna7 years agoContributor
Using mapper to drop fields is fine. I am asking is it possible to truncate the table before inserting data?. i.e table will have only latest execution data
- pedro_almeida7 years agoNew Contributor
As I see it, you have 2 options:
- Add an “Oracle Delete” Snap without any delete condition (DELETE FROM TableName) before inserting the data.
- If you really need to execute the Truncate instead of the Delete, you may try to create a stored procedure (On your Oracle DB) with “EXECUTE IMMEDIATE 'TRUNCATE TABLE ’ || TableName;” statement and then call this stored procedure on SnapLogic with the “Oracle Stored Procedure” Snap.
I would go for option 1 for simplicity.
- Siva_Venna7 years agoContributor
Thanks pedro.almeida, it worked :+1: