Azure Data Factory Azure Function Activity

To run Azure Functions from Azure Data Factory, we can create an Azure Function Activity. We must create a linked service to the Azure Function for this. Linked Services are similar to connection strings. A linked service contains all the information required to connect and authenticate the data factory with the service or data store that needs to be accessed.

While creating a linked service for Azure Function, there are certain properties that need to be set.

  • Type : Set to AzureFunction
  • function app url : URL for the Azure Function App
  • function key: Access key for the Azure Function

Apart from the above, Microsoft provides a table of Azure Function Activity properties that need to be set:

PropertyDescriptionAllowed valuesRequired
nameName of the activity in the pipelineStringyes
typeType of activity is ‘AzureFunctionActivity’Stringyes
linked serviceThe Azure Function linked service for the corresponding Azure Function AppLinked service referenceyes
function nameName of the function in the Azure Function App that this activity callsStringyes
methodREST API method for the function callString Supported Types: “GET”, “POST”, “PUT”yes
headerHeaders 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
bodybody that is sent along with the request to the function api methodString (or expression with resultType of string) or object. Required for PUT/POST methods

Table Source:

Azure Function activity also supports other features such as routing, queries and durable functions which will be discussed in a future post.

One thought on “Azure Data Factory Azure Function Activity

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: