0
votes

I am creating c# program and want to execute it from custom activity azure data factory. However, I am not getting the steps that I should follow. I have followed a Microsoft site for the same, but the steps are not clear. So please help.

1
need something step by step code by which i can configure and connect custom activity from c# programDpp
This answer discusses using Azure Batch (custom activity) in ADF: stackoverflow.com/questions/59938374/…Joel Cochran
In this Question it is mentioned "I wrote a .NET console app and deployed it to Azure Batch" this is the part where i am stuck. how to deploy our console app into azure batch and run that app from curstom activity pipeline. Any help will be much appreciated.Dpp
I'm just trying to be helpful, but the question does NOT say that. It says you "are creating a c# program and want to execute it from custom activity". It does not say it is a console app, nor does it say it was "deployed" to Azure Batch. I've added an answer below that will hopefully get you started.Joel Cochran

1 Answers

0
votes

The deployment happens at runtime. Basically, Data Factory passes the executable to the Batch service. If you haven't already done so, create an Azure Batch Linked Service to your Batch Account and reference it in the Custom Activity's "Azure Batch" tab.

You will need to load the executable package to a folder in Azure Blob Storage. Make sure to include the EXE and any dependent DLLs. In the "Settings" tab, do the following:

  1. Reference the Blob Storage Linked Service
  2. Reference the folder path that holds the executable(s).
  3. Specify the command to execute (which should be the ConsoleAppName.exe).

Here is a screen shot of the Settings:

enter image description here

If you need to pass parameters from ADF to Batch, they are called "Extended properties", and are handled differently in your Console app than typical parameters. More information can be found at this answer.