Execute Python script as a part of logic app

Siddhanth Shetty 66 Reputation points
2020-12-23T13:26:23.77+00:00

Hello,
To give some context to our problem we have a pipeline that needs to run on Azure Data Factory to create a CSV file(with a dynamic name Problem_1.csv, Problem_2.csv, etc). This CSV file then needs to be read by a Python script that executes and creates another output file. How do I execute this as part of the logic app workflow as well as passing input to the python script?
I did a search online and the options seem to be Azure WebApps or Azure Container Instances. Since we don't need this script to be running all the time but just run when the rest of the pipeline runs what would be our best option?

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
635 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,837 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,853 questions
0 comments No comments
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 22,386 Reputation points Microsoft Employee
    2020-12-24T02:06:23.513+00:00

    Hello @Siddhanth Shetty , According to me a Azure Function App running on a consumption plan will be better suited for the task as they offer serverless solution. Based on the scenario mentioned above I can think following steps for implementation.

    1. You can upload the csv file in Azure storage and which will trigger the function App containing your Python script which will generate the required file and upload it back to blob storage in a different container.
    2. For you Logic App, you can use the blob storage trigger to monitor the container above and create actions as required.

    Please let me know if there are any concerns.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful