Getting Started with R Services for SQL Server 2016
As part of SQL Server 2016, R Services expands the scope of these existing data technologies to include advanced analytics in enterprise workflows allowing for the building of intelligent, predictive applications by leveraging the R language and in-database analytics.
What is the R language?
- R is an open source programming language and has been used for over 15 years.
- R was developed at the University of Auckland, New Zealand and is based on the S programming language.
- The first stable version was released in 2000 and has had three major versions since.
R is extensible and has a large community of supporters that contribute to the growing number of packages.
An extensive collection of R packages is hosted on the Comprehensive R Archive Network (CRAN), which has over 7,000 packages as of 2016. There are other hosted packages available on GitHub and Microsoft R Application Network (MRAN).
Packages can be created using .NET, Python, Java, C, C++, Fortran, or R.
Packages are additional functions and features that can be added to any R project.
What is R Services for SQL Server 2016?R Services is a database service that runs outside the SQL Server process and communicates securely with the Microsoft R Open runtime.
With R Services, data scientists can easily build, retrain, score, and deploy predictive models. Once a solution is developed and tested, it can be operationalized by creating an R script within a stored procedure. These procedures can then be called upon from within an application.
R Services was first announced at the Microsoft Ignite conference in May 2015 and was made available with the CTP 3.0 release of SQL Server 2016. Since then, there have been many additions, and new products developed that incorporate R, such as Microsoft R Open , R Server , Azure Machine Learning , and Data Science Virtual Machine .
Why was R Services created?R Services overcomes previous challenges that limited R. These include:
- Data movement
R required a copy of the data to be on the client computer to compute. With R Services, the compute is brought to the SQL Server. The R script is executed on the SQL Server, and the data no longer needs to be moved. This is more secure and efficient since the data stays on the server.
Previously, integrating R into applications was not a simple task and often required rewriting the logic in another language. R Services makes it possible for R scripts to be embedded into T-SQL, which could be included as part of a stored procedure which greatly reduces the complexity of the integration process. Applications can now execute a stored procedure to run R scripts and operationalize the models developed in R within SQL Server.
In the past, scale and performance of R have been a limiting factor. When working with data, the entire dataset needed to be loaded into memory. Large data sets that would not fit into memory limited projects and teams.
Natively, R is a single-threaded application and running parallel processes was not possible without specific packages. R Services removes these limits by using ScaleR to support large datasets and parallel algorithms.
Get started with R Services today!
R Services is a welcomed addition to SQL Server, adding big data statistics, predictive modeling, and machine learning to the already robust capabilities of SQL Server.
SQL Server 2016 Developer Edition is a free download and an easy way to get started with R Services.
Additional links to get started with R Services can be found below.
SQL Server 2016 Developer Edition
R Services on MSDN
SQL Server R Services Tutorials
Microsoft R Server
Microsoft R Open
Set up R Services
Want to learn more about SQL?
Check out our blog post:
"Azure SQL Data Warehouse Introduction"
Schedule a data platform discovery session.
Posted by Lucas Feiock