sc-coder
sc-coder

Reputation: 5

Run Python script on Azure and save to SQL database

We have just signed up with Azure and were wondering how to schedule and run Python scripts that extract data from various sources like APIs, web scrape scripts, etc. What is the best tool on Azure that can run and schedule those scripts as well as save to target destination. The output of the scripts will be saved to either data lakes and/or azure sql database. Thank you.

Upvotes: 0

Views: 2351

Answers (1)

Ivan Glasenberg
Ivan Glasenberg

Reputation: 29940

There're several services in azure can do this task.

I suggest you can take use of azure webjobs(it supports python as well as support running as per schedule).

The rough guidelines are as below:

1.Develop your python scripts locally, make sure it can work locally(like extract data from other sources, save to azure database).

2.In azure portal, Create a scheduled WebJob. During creation, you need to upload the .py file(zip all the files into a .zip file); For "Type", please select "Triggered"; in the Triggers dropdown, select "Scheduled"; then specify at which time to run the .py file by using CRON Expression.

3.It's done.

You can also consider other azure services like azure function with time trigger. But the webjob is much more easier.

Hope it helps, and also please let me know if you still have more issues about that.

Upvotes: 2

Related Questions