Forum Discussion
8 Replies
- cstewartFormer Employee
If you put a mapper Snap in between, you can put the source fields in the source column, if you put no target for those fields, it will drop them in the data flow. Use the pass-through option to get all other fields passed to the output without having to put them all in the table
- Siva_VennaContributor
Thanks @cstewart. It worked.
I am getting below error while inserting data into Oracle table :Invalid timestamp format:
Resolution:
Please check for valid timestamp format.My coulmn datatype is DATE.
The timestamp snaplogic fetching : 2019-03-20T13:03:45+00:00
how to convert the this timestamp to Oracle DATE datatype? - dmillerFormer Employee
This post might help: SnapLogic DateTime Conversion Guidelines
- Siva_VennaContributor
Thank you @dmiller
that post helped me.
I want to truncate the table before loading/ inserting the data for every execution. is it possible?
- dmillerFormer Employee
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_VennaContributor
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_almeidaNew 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.