In one of the previous posts, we discussed how we can use Validation activity to design the Pipeline to wait for a scheduled time and retry. There is another way to introduce a delay in the Pipeline. Wait activity can be used to pause the execution of the Pipeline for a fixed amount of time.
Sometimes, we come across scenarios where we would like the execution for the Pipeline to be Paused for some time but not cancelled. Wait activity can be used in such scenarios.
Wait activity, internally, sets off a countdown timer for the amount of time that has been set in the Wait time in seconds setting. During this wait time, the Pipeline control is actually monitoring the timer.
As we can see in the above screenshot, Wait activity is a simple activity to configure, with just one setting for the Wait time. In the above example, the Copy Data activity will only be executed after the specified number of seconds.
Another use case of Wait activity could be inside a For Each Activity. Consider a scenario where we would like the next file from the source to be loaded to the sink at least 10 seconds after the previous file (so that the sink is ready). We can simply use a wait activity inside a For Each loop to pause the execution for 10 seconds.
Also, as with other settings in Data Factory, there is option to set the Wait time dynamically (based on a calculation or parameter).