Skip to content

Latest commit

 

History

History
108 lines (94 loc) · 3.81 KB

control-flow-wait-activity.md

File metadata and controls

108 lines (94 loc) · 3.81 KB
title description services documentationcenter author manager ms.reviewer ms.service ms.workload ms.tgt_pltfrm ms.devlang ms.topic ms.date ms.author
Wait activity in Azure Data Factory | Microsoft Docs
The Wait activity pauses the execution of the pipeline for the specified period.
data-factory
sharonlo101
craigg
douglasl
data-factory
data-services
na
na
conceptual
01/10/2018
shlo

Wait activity in Azure Data Factory

When you use a Wait activity in a pipeline, the pipeline waits for the specified period of time before continuing with execution of subsequent activities.

Syntax

{
    "name": "MyWaitActivity",
    "type": "Wait",
    "typeProperties": {
        "waitTimeInSeconds": 1
    }
}

Type properties

Property Description Allowed values Required
name Name of the Wait activity. String Yes
type Must be set to Wait. String Yes
waitTimeInSeconds The number of seconds that the pipeline waits before continuing with the processing. Integer Yes

Example

Note

This section provides JSON definitions and sample PowerShell commands to run the pipeline. For a walkthrough with step-by-step instructions to create a Data Factory pipeline by using Azure PowerShell and JSON definitions, see tutorial: create a data factory by using Azure PowerShell.

Pipeline with Wait activity

In this example, the pipeline has two activities: Until and Wait. The Wait activity is configured to wait for one second. The pipeline runs the Web activity in a loop with one second waiting time between each run.

{
    "name": "DoUntilPipeline",
    "properties": {
        "activities": [
            {
                "type": "Until",
                "typeProperties": {
                    "expression": {
                        "value": "@equals('Failed', coalesce(body('MyUnauthenticatedActivity')?.status, actions('MyUnauthenticatedActivity')?.status, 'null'))",
                        "type": "Expression"
                    },
                    "timeout": "00:00:01",
                    "activities": [
                        {
                            "name": "MyUnauthenticatedActivity",
                            "type": "WebActivity",
                            "typeProperties": {
                                "method": "get",
                                "url": "https://www.fake.com/",
                                "headers": {
                                    "Content-Type": "application/json"
                                }
                            },
                            "dependsOn": [
                                {
                                    "activity": "MyWaitActivity",
                                    "dependencyConditions": [ "Succeeded" ]
                                }
                            ]
                        },
                        {
                            "type": "Wait",
                            "typeProperties": {
                                "waitTimeInSeconds": 1
                            },
                            "name": "MyWaitActivity"
                        }
                    ]
                },
                "name": "MyUntilActivity"
            }
        ]
    }
}

Next steps

See other control flow activities supported by Data Factory: