By Ken Whiteside

DataXperts

 

Conditioning your Control Flow.

 

Data Flow has conditioning widgets built in, and obvious to the user. Putting conditions on your control flow is not so apparent!  One way you can do this is change your data flow path from the standard Success / Failure to include an expression. In the example below, I only want to execute the send mail task if a certain condition exists. Create a task variable and use the SQL Task to update that variable.

 

Right click on the data flow and use an expression to check the status of your variable and only execute the Send Mail if it meets your criteria.

 

 

If the myCount variable is not greater than zero, the send mail task will not execute!