Forum Discussion
SL12345 - you need to remember that SnapLogic is a streaming platform, meaning that by placing the truncate where you did, it is performing the truncate for every record in the file before inserting each record, which doesn't make sense. You can move the truncate before the File Reader so that the sequence is truncate, read, parse, insert.
If you want to ensure that the file exists before truncating the target, you can put a Directory Browser snap at the beginning of the pipeline so it can stop successfully if the file doesn't exist and won't truncate the table in that case. If it does exist, it will continue along with the truncate, file read, parse, and load.
Hope this helps!
- ykoppisetty3 years agoNew Contributor II
Hi @j.angelevski @shashish.jha
When I am trying through dynamically I am getting the below error.Can you please resolve this error. I have also tried the @shashish.jha formula. But that’s also getting error. Please help me on this.
Thank you.