Gangrel
Gangrel

Reputation: 481

Recommended approach for scheduling a python script within Azure and pushing to database

I have a python script that pulls data from an API, performs some transformations and finally spits out the data in a csv file.

Currently I use windows scheduler to perform this task daily.

I would like to further automate this task and have it sit within an azure environment that will run the script overnight on schedule but also push the results to an azure database.

I already have an azure subscription including a number of databases.

Two approaches I have read about are:

  1. Virtual Machine within azure. Use the windows scheduler within the VM to run the script and push to database

  2. Use azure web apps to run the script and push to database. (no VM needed)

I was hoping someone could recommend the more efficient approach to doing this?

Upvotes: 0

Views: 909

Answers (1)

Shirin
Shirin

Reputation: 168

I would strongly recommend to look at Azure Functions.

It is basically serverless architecture. It will allow you to host your existing code without Virtual Machine or WebAPP.

It can be configured to run at your requirements and times.

https://azure.microsoft.com/en-us/services/functions/

You can set the connection string to your sql envrionment and connect to your sql database to push the data.

Upvotes: 1

Related Questions