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??
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??
Hello @EngyTawadros-3500
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.
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.
20 people are following this question.
Google Analytics Data Migration to Azure Synapse
HOW CAN I RETRIEVE A TRANSLATION I MADE IN THE SOFTWARE DOCUMENT TRANSLATOR ?
Thank You to the Microsoft Q&A Community Champions
convert string to float in azure data factory in copy activity
Is it possible to submit a spark job from Azure function written in python?