SQL Server Python tutorials
This article provides a list of tutorials and samples that demonstrate the use of Python with SQL Server 2017. Through these samples and demos, you will learn:
- How to run Python from T-SQL
- What are remote and local compute contexts, and how you can execute Python code using the SQL Server computer
- How to wrap Python code in a stored procedure
- Optimizing Python code for a SQL production environment
- Real-world scenarios for embedding machine learning in applications
For information about requirements and setup, see Prerequisites.
Learn the basics of how to call Python in T-SQL, using the extensibility mechanism pioneered in SQL Server 2016.
This lesson demonstrates how you can run code from a remote Python terminal, using SQL Server compute context. You should be somewhat familiar with Python tools and environments. Sample code is provided that creates a model using rxLinMod, from the new revoscalepy library.
This end-to-end walkthrough demonstrates the process of building a complete Python solution using T-SQL stored procedures. All Python code is included.
These samples and demos provided by the SQL Server development team highlight ways that you can use embedded analytics in real-world applications.
Learn how a ski rental business might use machine learning to predict future rentals, which helps the business plan and staff to meet future demand.
Now includes native scoring from Python models!
Learn how to use the Kmeans algorithm to perform unsupervised clustering of customers.