Revolution R now available with SQL Server Community Preview

October 28, 2015
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

The new SQL Server 2016 is now available as part of the Community Technical Preview program, and as presaged it embeds connectivity with the R language and the big-data statistical algorithms of Revolution R Enterprise.

SQL Server 2016 includes two ways of calling R. The first is by embedding R code direcly in a SQL Stored Procedure, which can then be called by other applications to embed charts or tables created by R using data in the database.

Leveraging%20R%20Scripts%20and%20Models%20from%20T-SQL

The second way allows you to use the RevoScaleR package in Revolution R Enterprise (included with SQL Server 2016) to create statistical models using data in SQL Server 2016, and use the computing power of the database to fit the model. The process in R is follows:

  • Make a connection to the SQL Server 2016 database (using login credentials)
  • Create an object referencing a table or query in SQL Server 2016
  • Instruct Revolution R Enterprise to perform computations in the database (by setting the "compute context" to SQL Server 2016)
  • Use one of the RevoScaleR "rx" functions to fit the model, using a syntax similar to standard R functions.

Heres some code demonstrating fitting a linear regression on the famous "airlines" data set, as stored in the database (and for more background, see this blog post by Andrie de Vries):

SQL Model

For more on the new features in SQL Server 2016 and how to access the Community Technology Preview, follow the link below.

SQL Server blog: SQL Server 2016 Community Technology Preview 3.0 is available

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)