Showing posts with label data-flow-task. Show all posts
Showing posts with label data-flow-task. Show all posts

Thursday, March 8, 2012

Check condition and wait

Hi,

I have a data-flow-task that imports data to sqlserver.

Now I want to check, if a special column of an imported record is null.

If yes, I have to wait 10 minutes and jump to the data-flow-task again. (Cjeck and wait).

How can I do this with the integration services?

Thanks

Gerd

You can do timer style loops, so this could be extended for your loop on the 10 minute, and maybe use some extra variables to keep track.

For Loop Container Samples
(http://www.sqlis.com/310.aspx)

You could have an Exec SQL Task inside your loop as the first task. Query the column and assign a variable value using the query result to indicate if the column is true. Then have a Data Flow Task linked from the Exec SQL Task and use an Expression on the constraint such that it is satisfied only when the variable in indicates that the Exec SQL Task found a value.

The final thing would be to extend the loop EvalExpression such that if it would not wait/loop if the Exec SQL Task assigned variable indicate data had been found.

The principal seems sound, though you may want to adjust the expressions and variables used to fit exactly with what you want.