We are excited to announce that Machine Learning Services with support for R is now available for public preview on Azure SQL Database. Machine Learning Services has transformed SQL Server into a versatile machine learning platform. We are now bringing the same in-database machine learning capabilities to the fully managed Azure SQL Database. We are beginning with support for the R language in this preview release and will be adding Python language support in a future update.

End to end machine learning with R in Azure SQL Database

Using Machine Learning Services with R support in Azure SQL Database, you can –

  • Run R scripts to do data preparation and general purpose data processing – You can now bring your R scripts to Azure SQL Database where your data lives, instead of having to move data out to some other server to run R scripts. You eliminate the need for data movement and associated problems related to latency, security, compliance, etc.
  • Train machine learning models in database – You can train models using open source algorithms or Microsoft’s scalable algorithms in RevoScaleR and MicrosoftML packages in database. You can easily scale your training to the entire dataset rather than relying on sample datasets pulled out of the database. During the model training and exploration stage, you can push your R scripts to run in database from any R IDE running on client machines using the remote compute context functionality in RevoScaleR package.
  • Deploy your models and R scripts into production in stored procedures – The R scripts and trained models can be operationalized simply by embedding them in T-SQL stored procedures. Apps connecting to Azure SQL Database can benefit from predictions and intelligence in these models by just calling a stored procedure. You can also use the native T-SQL PREDICT function to operationalize models, which is already supported in Azure SQL Database for fast scoring in highly concurrent real-time scoring scenarios.

These capabilities combined with the flexibility, scalability and elasticity benefits of the fully managed Azure SQL Database, make it a powerful AI environment on the cloud. The combination of capabilities like in-memory technology, columnstore indexes, and parallelized and scalable algorithms offer enterprise-grade performance for doing R based machine learning in Azure SQL Database.  Integration of R in Azure SQL Database enables interesting hybrid scenarios as well – you can train a model in an on-premises SQL Server and use the model to score data in Azure SQL Database and vice versa.

Preview Functionality

During the preview, Microsoft will help upgrade/migrate your existing databases or create new ones with R capability. This functionality is only supported in vCore-based purchasing models in Business Critical and General Purpose tiers. Existing databases should be migrated to the vCore based model before they can be enabled with R capability.  These databases can be migrated back out of the preview with no impact to your database. Only Gen 5 hardware will support Machine Learning Services with R.

This preview functionality is initially available in a limited number of regions in US, Asia Europe, and Australia with additional regions being added later. During the preview, Machine Learning Services with R is not supported for production usage.

If you are interested in joining the preview program, please send an email to sqldbml@microsoft.com with these details: database name, logical server name, desired service tier, and subscription id. If you are creating a new database, we will only need the subscription id and the desired service tier. We will work with you to provide you with the new or migrated databases with R support. Depending on the demand, we may limit the access to this functionality during the preview. You do not need to do any additional installation or configuration steps after your database is enabled with R support.

You can read more about Machine Learning Services with R in Azure SQL Database and try quick start tutorials at this documentation page. You can read about general Machine Learning Services in SQL Server. We look forward to hearing from you at sqldbml@microsoft.com and working closely with you on this preview!