skip to Main Content

I have a program the generates an .exe file. Unfortunately, I do not have any idea about how this program is implemented, and our team consumes it as a black box.

I am trying to run this .exe file (which helps parse and does some computation based on json data) as a part of my Azure Data Factory Pipeline. Since I do not want to make changes to the source code without any idea on how it works, I want to just consume this exe file in my pipeline directly.

Is there any way in Azure Data Factory that allows me to do this? If so how?

Read some documentation on creating a batch account and using the program as a custom activity but this requires making changes to the source code, which I do not have the ability to at the moment.

2

Answers


  1. I dont think that you can do that in ADF , but you may explore SSIS "Execute Process Task" and then stich that with ADF .

    https://learn.microsoft.com/en-us/sql/integration-services/control-flow/execute-process-task?view=sql-server-ver16

    Login or Signup to reply.
  2. If I were in your situation I would do the following:

    1. Have the Program (or ADF) drop the .exe onto an Azure Virtual
      Machine
    2. Use ADF to do a Run Command via Rest API call to the Azure
      VM that will run the .exe file
    3. Once the VM finishes running the .exe, you can then use ADF to consume the output of the .exe (whatever that may be), and put it wherever it needs to go.

    Here is the link for the Azure VM Run Command API

    Here is an actual pipeline Activity Example of executing the run command on a VM (Using Powershell):

    {
    "name": "Run Print Script VM2",
    "description": "Execute PowerShell script on azure VM to print the letter",
    "type": "WebActivity",
    "dependsOn": [
        {
            "activity": "ForEach_Stage",
            "dependencyConditions": [
                "Succeeded"
            ]
        }
    ],
    "policy": {
        "timeout": "7.00:00:00",
        "retry": 0,
        "retryIntervalInSeconds": 30,
        "secureOutput": false,
        "secureInput": false
    },
    "userProperties": [],
    "typeProperties": {
        "url": {
            "value": "https://management.azure.com/subscriptions/{YourSubscriptionID}/resourceGroups/{YourResourceGroupName}/providers/Microsoft.Compute/virtualMachines/{YourVMName}/runcommand?api-version=2019-12-01",
            "type": "Expression"
        },
        "method": "POST",
        "headers": {
            "contentpType": "application/json"
        },
        "body": {
            "value": "{n"commandId": "RunPowerShellScript",n"script": ["C:\\IT\\script-execute-taskscheduler-task-heliosprinter.ps1"]n}",
            "type": "Expression"
        },
        "authentication": {
            "type": "MSI",
            "resource": "https://management.azure.com/"
        }
    }
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search