You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Azure Function activity allows you to run [Azure Functions](../azure-functions/functions-overview.md) in an Azure Data Factory or Synapse pipeline. To run an Azure Function, you must create a linked service connection. Then you can use the linked service with an activity that specifies the Azure Function that you plan to execute.
18
20
@@ -21,15 +23,16 @@ The Azure Function activity allows you to run [Azure Functions](../azure-functio
21
23
To use an Azure Function activity in a pipeline, complete the following steps:
22
24
23
25
1. Expand the Azure Function section of the pipeline Activities pane, and drag an Azure Function activity to the pipeline canvas.
24
-
1. Select the new Azure Function activity on the canvas if it is not already selected, and its **Settings** tab, to edit its details.
26
+
27
+
2. Select the new Azure Function activity on the canvas if it is not already selected, and its **Settings** tab, to edit its details.
25
28
26
29
:::image type="content" source="media/control-flow-azure-function-activity/azure-function-activity-configuration.png" alt-text="Shows the UI for an Azure Function activity.":::
27
30
28
-
1. If you do not already have an Azure Function linked service defined, select New to create a new one. In the new Azure Function linked service pane, choose your existing Azure Function App url and provide a Function Key.
29
-
31
+
3. If you do not already have an Azure Function linked service defined, select New to create a new one. In the new Azure Function linked service pane, choose your existing Azure Function App url and provide a Function Key.
32
+
30
33
:::image type="content" source="media/control-flow-azure-function-activity/new-azure-function-linked-service.png" alt-text="Shows the new Azure Function linked service creation pane.":::
31
34
32
-
1. After selecting the Azure Function linked service, provide the function name and other details to complete the configuration.
35
+
4. After selecting the Azure Function linked service, provide the function name and other details to complete the configuration.
33
36
34
37
## Azure Function linked service
35
38
@@ -39,27 +42,26 @@ The return type of the Azure function has to be a valid `JObject`. (Keep in mind
39
42
Function Key provides secure access to function name with each one having separate unique keys or master key within a function app. Managed identity provides secure access to the entire function app. User needs to provide key to access function name. For more information, see the function documentation for more details about [Function access key](../azure-functions/functions-bindings-http-webhook-trigger.md?tabs=csharp#configuration)
40
43
41
44
42
-
|**Property**|**Description**|**Required**|
43
-
| --- | --- | --- |
44
-
| Type | The type property must be set to: **AzureFunction**| Yes |
45
-
| Function app url | URL for the Azure Function App. Format is `https://<accountname>.azurewebsites.net`. This URL is the value under **URL** section when viewing your Function App in the Azure portal | Yes |
46
-
| Function key | Access key for the Azure Function. Click on the **Manage** section for the respective function, and copy either the **Function Key** or the **Host key**. Find out more here: [Azure Functions HTTP triggers and bindings](../azure-functions/functions-bindings-http-webhook-trigger.md#authorization-keys)| Yes |
| Type | The type property must be set to: **AzureFunction**| Yes|
48
+
| Function app url | URL for the Azure Function App. Format is `https://<accountname>.azurewebsites.net`. This URL is the value under **URL** section when viewing your Function App in the Azure portal | Yes|
49
+
| Function key | Access key for the Azure Function. Click on the **Manage** section for the respective function, and copy either the **Function Key** or the **Host key**. Find out more here: [Azure Functions HTTP triggers and bindings](../azure-functions/functions-bindings-http-webhook-trigger.md#authorization-keys)| Yes|
50
+
|Authentication | The authentication method used for calling the Azure Function. The supported values are 'System-assigned managed identity' or 'anonymous'. | Yes |
| Name | Name of the activity in the pipeline | String | Yes |
54
-
| Type | Type of activity is ‘AzureFunctionActivity’ | String | Yes |
55
-
| Linked service | The Azure Function linked service for the corresponding Azure Function App | Linked service reference | Yes |
56
-
| Function name | Name of the function in the Azure Function App that this activity calls | String | Yes |
57
-
| Method | REST API method for the function call | String Supported Types: "GET", "POST", "PUT" | Yes |
58
-
| Header | Headers that are sent to the request. For example, to set the language and type on a request: "headers": { "Accept-Language": "en-us", "Content-Type": "application/json" } | String (or expression with resultType of string) | No |
59
-
| Body | Body that is sent along with the request to the function api method | String (or expression with resultType of string) or object. | Required for PUT/POST methods |
| Name | Name of the activity in the pipeline | String | Yes |
57
+
| Type | Type of activity is ‘AzureFunctionActivity’ | String | Yes |
58
+
| Linked service | The Azure Function linked service for the corresponding Azure Function App | Linked service reference | Yes |
59
+
| Function name | Name of the function in the Azure Function App that this activity calls | String | Yes |
60
+
| Method | REST API method for the function call | String Supported Types: "GET", "POST", "PUT" | Yes |
61
+
| Header | Headers that are sent to the request. For example, to set the language and type on a request: "headers": { "Accept-Language": "en-us", "Content-Type": "application/json" } | String (or expression with resultType of string) | No |
62
+
| Body | Body that is sent along with the request to the function api method | String (or expression with resultType of string) or object. | Required for PUT/POST methods |
61
63
62
-
See the schema of the request payload in[Request payload schema](control-flow-web-activity.md#request-payload-schema)section.
64
+
See the schema of the request payload in[Request payload schema](control-flow-web-activity.md#request-payload-schema)section.
63
65
64
66
## Routing and queries
65
67
@@ -70,7 +72,7 @@ The Azure Function Activity supports **routing**. For example, if your Azure Fun
70
72
71
73
The Azure Function Activity also supports **queries**. A query must be included as part of the `functionName`. For example, when the function name is `HttpTriggerCSharp` and the query that you want to include is `name=hello`, then you can construct the `functionName` in the Azure Function Activity as `HttpTriggerCSharp?name=hello`. This function can be parameterized so the value can be determined at runtime.
72
74
73
-
## Timeout and longrunning functions
75
+
## Timeout and long-running functions
74
76
75
77
Azure Functions times out after 230 seconds regardless of the `functionTimeout` setting you've configured in the settings. For more information, see [this article](../azure-functions/functions-versions.md#timeout). To work around this behavior, follow an async pattern or use Durable Functions. The benefit of Durable Functions is that they offer their own state-tracking mechanism, so you don't need to implement your own state-tracking.
0 commit comments