Welcome to blogs.conchango.com Sign in | Join | Help

Welcome to blogs.conchango.com

SSIS Junkie

SSIS Nugget: Conditional Execution

A question was asked on the SSIS forum about conditional execution. The questioner had a data-flow that checked some incoming values and, depending on cetain characteristics, could identify that row as being "bad". (S)he then wanted to do some action (in this case send a mail) if the number of bad rows exceeded 0.

Conditional execution is what is needed to accomplish this - namely expressions on our precedence constaints. The steps are to:

1) Use the rowcount component to capture the number of bad rows

2) Populate a variable with the number of bad rows

3) Check the value of a the variable in a precedence constraint. if it is greater than 0, do the action.

I have put together a little demo of this that may prove useful. I have used a script task to display a message box for the "action" rather than sending a mail. It can be downloaded from here: http://blogs.conchango.com/Admin/ImageGallery/blogs.conchango.com/jamie.thomson/20050725ConditionalExecution.zip.

-Jamie

Published 25 July 2005 12:52 by jamie.thomson

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Jamie Thomson's Blog said:

I hate commuting. There's no two ways of saying it, I despise it. Every day I face the 70 minute grind...
July 25, 2005 16:10
 

Jamie Thomson - Life, the universe and SSIS! said:

I hate commuting. There's no two ways of saying it, I despise it. Every day I face the 70 minute grind...
July 27, 2005 16:04
 

Thank you said:

Your site is realy very interesting.
February 22, 2006 21:50
 

Jamie said:

You have some great stuff here - keep it up.

You're turning me into an expression expert.

May 13, 2008 15:58

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

Powered by Community Server (Personal Edition), by Telligent Systems