cancel
Showing results for 
Search instead for 
Did you mean: 

Snap sql server execute

sanam
New Contributor

Hi Team,

when i write two statement in sql server execute snap. e.g first is truncate table and then load table it does not error out if the second sql statement fails.

Can you please let ,me know if there is any way to make the snap fail if any sql statements have errors?

2 REPLIES 2

dmiller
Former Employee

Welcome back, @sanam

A couple of suggestions have been proposed around the virtual water cooler today 🙂

  • Have one execution per Snap, as this makes troubleshooting easier. It also makes the pipeline easier to read if someone new has to pick it up.
  • drop these into a sub-pipeline, where they can still be executed as individual Snaps, but the errors could be handled separately. This would have the advantage of being still just a single step in the parent pipeline.

Diane Miller

sanam
New Contributor

it will be great if I could put two sqls in one execute and handle the errors.
for simple steps it really make my pipeline long.

Thankyou for the prompt reply.