jasona.work - Wednesday, June 14, 2017 10:33 AM
I agree with RonKyle. If you use OR, as soon as 1 of the steps completes, it will start the data flow task which will likley be blocked by the truncates but may not be.
I would use the sequence container (as Phil pointed out) and set the output of that to go to the Data Flow task on Completion instead of on success or failure (which RonKyle also suggested).
Having all of the truncates in 1 step is iffy too. Having the 5 steps truncating means that 1 or more can fail and the others will succeed. With them all in 1 step I believe (not 100% sure, but fairly confident) that if any of them fail, it will roll back the changes. So if the 5th truncate failed in the 1 step scenario, none of the tables would be truncated.
I would confirm with the end user about duplicate data though. If one of the truncates fails and you go to the data flow task, presuming there are no constraint violations, any table that failed to truncate is at risk for having duplicate data as the data flow task doesn't do any duplicate data checking on its own unless you implement it.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.