Python tutorials for SQL machine learning

Applies to: yesSQL Server 2017 (14.x) and later YesAzure SQL Managed Instance

This article describes the Python tutorials and quickstarts for Machine Learning Services on SQL Server and on Big Data Clusters.

This article describes the Python tutorials and quickstarts for SQL Server Machine Learning Services.

This article describes the Python tutorials and quickstarts for Azure SQL Managed Instance Machine Learning Services.

Python tutorials

Tutorial Description
Predict ski rental with linear regression Use Python and linear regression to predict the number of ski rentals. Use notebooks in Azure Data Studio for preparing data and training the model, and T-SQL for model deployment.
Categorizing customers using k-means clustering Use Python to develop and deploy a K-Means clustering model to categorize customers. Use notebooks in Azure Data Studio for preparing data and training the model, and T-SQL for model deployment.
Create a model using revoscalepy Demonstrates how to run code from a remote Python client using SQL Server as compute context. The tutorial creates a model using rxLinMod from the revoscalepy library.
Python data analytics for SQL developers This end-to-end walkthrough demonstrates the process of building a complete Python solution using T-SQL.
Tutorial Description
Predict ski rental with linear regression Use Python and linear regression to predict the number of ski rentals. Use notebooks in Azure Data Studio for preparing data and training the model, and T-SQL for model deployment.
Categorizing customers using k-means clustering Use Python to develop and deploy a K-Means clustering model to categorize customers. Use notebooks in Azure Data Studio for preparing data and training the model, and T-SQL for model deployment.

Python quickstarts

If you are new to SQL machine learning, you can also try the Python quickstarts.

Quickstart Description
Run simple Python scripts Learn the basics of how to call Python in T-SQL using sp_execute_external_script.
Data structures and objects using Python Shows how SQL uses the Python pandas package to handle data structures.
Create and score a predictive model in Python Explains how to create, train, and use a Python model to make predictions from new data.

Next steps