Share via

Azure Function

Engy Tawadros 46 Reputation points
2022-03-21T20:11:28.417+00:00

I have a Python Script that generates data in a data frame output that I need to store in the database. what will be the best way to run my Python script? Azure Function or Notebooks and why??

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

Azure Synapse Analytics
Azure Synapse Analytics

An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.

0 comments No comments

Answer accepted by question author

Eric Boyd 341 Reputation points Microsoft Regional Director
2022-03-22T01:54:20.003+00:00

Hello @Engy Tawadros

If you want to execute your script manually and interactively, then Azure Notebooks will work great.

If your script needs to execute based on an event occurring, like a http request to an API, a new message in Service Bus, an event in Event Hubs, a timer elapsing, a file being saved to storage, etc., and your script executes in a reasonably short period of time, then Azure Functions is a great service.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,511 Reputation points
    2022-03-22T09:15:28.58+00:00

    @Engy Tawadros ,

    Thanks for reaching out to Q&A.

    It actually depends on the business requirements and how the script needs to be invoked. Azure notebooks are like a document that contains a lot of content and python script snippets where the pthon script can be executed within the document itself by invoking manually. It is widely used in datascience and academics field. Whereas Azure functions is very vast and it is microservice based architecture.

    Azure functions can be triggered in many ways and can also be scheduled to run at specific times. You can choose the underlying OS and has various hosting options. If you would like to have long running functions, you can choose durable functions as well. You have the ability to run locally and also host it in Azure functions runtime. Functions can be integrated with lots of other Azure services as it has built in bindings. There is also a dedicated language worker for python and you will have a lot of control in terms of performance/connections/hosting.

    I hope this helps!

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.