One thing that I really like with Data Factory is the possibility to execute a Function App. A Function App is really flexible and can be used to extend the available functionality in Data Factory a lot. You could, for example, process your SSAS Tabular models, do advanced file handling or send emails.
Below are some easy steps on how to execute a Function App within Data Factory.
Search for “Function App” in the search box
Create a new Function App
In this case, I will name it “ADFFunctionApp”. Click on “Create” and wait for it to be created in the background.
When it is created you need to find the host key for the function.
Click on “Function app setting”
Copy the default host key
Then open your Data Factory and add an Azure Function to your canvas.
Click on the Azure Function and create a new linked service.
Fill out required columns to create a new linked service. The function key is the host key that you copied in from your Azure Function.
So now we have created a Function App and created a reference to it in our Data Factory. Next will be to create a function. Open your function again.
Click on the “+” next to “Functions”
I will choose “In-portal” in this sample
Click on “Continue”
Choose “Webhook + API”. Open the code. Change the code block as in the screenshot below. Data Factory does not like the return type of the auto-generated code.
Then go back to your Data Factory and click on App Function. Choose your function name, set method to “POST” and add the JSON to the “Body”.
Then execute your Data Factory. If everything works out you will get this result