How to execute a Python script reside in a vm using ADF.


  • Hi All,

    I have a python script resides in an Azure VM.This script uses few local files from this VM. I need to create an ADF  pipeline which will  execute this python script resides in this on premise VM. As the script is placed on premise , i can't use any cluster activity of ADF. So Basically the pipeline should connect to the VM and trigger the script execution.I could think of an option of using Custom Activity of ADF and trigger Powershell command from there to this on premise python script. But not sure how to connect to on premise scripts.Any help on this is appreciated.

    Thanks in Advance.



    • Edited by Atherd1303 Monday, October 15, 2018 6:54 PM
    Monday, October 15, 2018 1:29 PM

All replies

  • Hello Ather,

    I think the easiest method to get the script to execute would be a custom .NET activity. You'll need to use something like Batch Service to run the .NET code that will kick off your Python script somehow (maybe hosting it as an API listening in your VM).

    The other option is to actually put the Integration Runtime (IR) on-premises, although without knowing the details this may not accomplish exactly what you want. 

    Monday, October 15, 2018 3:27 PM