by Andrie de Vries
The second week of SQLRelay (#SQLRelay) kicked off in London earlier this week. SQLRelay is a series of conferences, spanning 10 cities in the United Kingdom over two weeks. The London agenda included 4 different streams, with tracks for the DBA, BI and Analytics users, as well as a workshop track with two separate tutorials.
My speaking slot was in the afternoon, with the title "In-database analytics using Revolution R and SQL".
In my talk I covered:
- A high level overview of R
- Data science in the cloud
- Connecting R to SQL
- Scalable R
- R in SQL Server
- Moving your workflow to the cloud
- Connecting R to SQL Server using an RODBC connector
- Using Revolution R Enterprise (RRE) in a local parallel compute context, reading data from a local file
- Changing the compute context to SQL Server, and running the R code directly inside the SQL Server machine
The last two demonstrations demonstrate how to run some R code embedded in a SQL stored procedure:
- Creating a very simple script that calls out to R
- Using R to generate some data, in this case simply bringing some data in from the famous iris data set that is built into R.
Presentation
The presentation is available on SlideShare:
Sample code
Here are the code samples I used in the demonstration:
Very interesting post Andrie, thank you.
I saw a similar demo of executing R inside SQL Server months ago, but AFAIK this funcionality is still not available in current CTP (2.4) of SQL Server, isn't it? Did you use a different (special) version of SQL 2016 or do we have to change some configuration in order to activate this functionality?
Thanks in advance
Posted by: csm | October 15, 2015 at 00:39
Thanks Andrie for sharing! I am very much looking forward to try out myself.
Any idea where can I find more information on licencing RRE in combination with existing SQL Server licenses?
Posted by: Matthias | October 15, 2015 at 01:52
Andrie,
Great article. Thanks for sharing!
Can't wait to see R inside SQL Server. Exciting times!
Posted by: John Ryle | October 15, 2015 at 10:47
If one wants to see the "proper" way to execute R from inside a database engine, read-up Joe Conway's notes on PL/R with Postgres. You needn't install either to see the semantics; basically, register R and create User Defined Functions. Here: http://www.joeconway.com/plr/doc/index.html
Posted by: Robert Young | October 16, 2015 at 05:45
Thanks for sharing, excellent article.
Posted by: Ramdas | October 19, 2015 at 07:20