Using the Azure Functions Task

The Azure Functions Task is a control flow component that can be used to execute Azure Functions using HTTP triggers. There are three pages that can be configured:

  • General
  • Output
  • Error Handling

General Page

The general page holds the general settings for Azure Functions Task.

SSIS Azure Functions Task Editor - General

Connection Manager

The Azure Functions Destination Component requires a connection in order to connect the specific Azure Functions. The Connection Manager drop-down will show a list of all connection managers that are available to your current SSIS packages.

URL

The URL specifies the route of the function, and it is usually in the below format:

http://<APP_NAME>.azurewebsites.net/api/<FUNCTION_NAME>

Authorization Level

Authorization level controls whether the function requires an API key and which key to use. You can choose from the below three types depending on how it has been specified in the Azure portal for the function.

  • Function - Default value. Uses a function key, found in the 'keys' management panel on the portal.
  • Admin - Uses your master key, found in the 'keys' management panel on the portal.
  • Anonymous - No API key is required.
Authorization Code

The code of the function generated from the Azure portal is to be specified here which goes in the request header.

Method

An array of the HTTP methods to which the function responds. If not specified in the Azure portal, the function responds to all HTTP methods. You can choose from the below:

  • DELETE
  • GET
  • HEAD
  • OPTIONS
  • PATCH
  • POST
  • PUT
  • TRACE
Body

Specify the values to be in the body of the request. You can choose the Editor pane to accept the below.

  • HTML
  • JSON
  • Plain Text
  • SQL
  • XML
Query String

The Query String values can be specified here. You can click on the “+” button to add the Query String Name and the Query String Value.

Headers

Specify any header values to go with the request. You can click on the “+” button to add the Header Name and the Header Value

Preview Button

The preview button launches the Preview dialog which will send the first request based on the current settings of the component, and show a preview of the response. You can execute the function with the button “Execute Function” and get the response in the second window.

Expression fx Icon

Click the blue fx icon to launch SSIS Expression Editor to enable dynamic updates of the property at run time.

Output Page

The page can be used to configure the output properties for Azure Functions.

SSIS Azure Functions Task Editor - Output

Response Output Variables
Response Body

Specify a variable to write the response body.

Response status code

Specify a variable to write the response status code.

Response status code name

Specify a variable to write the response code name.

Write Body to File
This option can be enabled to write the response body to a file.
Response Headers
Header name

Specify the name of the header.

Variable name

Choose the variable from the list to write the header name to it.

Error Handling Page

This page can be configured to handle errors.

SSIS Azure Functions Task Editor - Error Handling

There are three options to choose from:

  • Fail on error - This fails the task upon an error and captures it in the execution results.
  • Write error to variable - Captures the error to a variable at runtime.
  • Ignore error - Ignores the error and proceeds.