Blog: R YOU READY FOR.

Slides:



Advertisements
Similar presentations
Oracle SQL Developer Data Modeler 3.0: Technical Overview March 2011.
Advertisements

Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
Technical BI Project Lifecycle
Installing Windows XP Professional Using Attended Installation Slide 1 of 41Session 2 Ver. 1.0 CompTIA A+ Certification: A Comprehensive Approach for all.
Automation using Selenium Authored & Presented by : Chinmay Sathe & Amit Prabhu Cybage Software Pvt. Ltd.
Stored Procedures Dr. Ralph D. Westfall May, 2009.
Overview What is SQL Server? Creating databases Administration Security Backup.
Report Management and Creation using Microsoft SQL Server 2008 Reporting Services Chris Testa-O’Neill Database Product Planner Remarc Group.
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
Hands-On Microsoft Windows Server 2008 Chapter 5 Configuring, Managing, and Troubleshooting Resource Access.
Basic R Programming for Life Science Undergraduate Students Introductory Workshop (Session 1) 1.
1 CSC 440 Database Management Systems JDBC This presentation uses slides and lecture notes available from
Tim Leung SQL Bits October  Features and Advantages  Architecture  Installation  Creating Reports.
Overview of SQL Server Alka Arora.
How a little code can help with support.. Chris Barba – Developer at Cimarex Energy Blog:
Verify Hardware Requirements Install Windows Server 2008 R2 Configure Active Directory Install SQL Server 2008 Install SharePoint Server 2010 Configure.
1 SQL Server 2000 Administration Kashef Mughal MSB.
We will start soon. Feel free to ask (chat window) anything you want before we start.
Introduction to CS520/CS596_026 Lecture Two Gordon Tian Fall 2015.
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
SQL Server 2012 Session: 1 Session: 3 Introduction to SQL Server 2012 Data Management Using Microsoft SQL Server.
1 Chapter Overview Performing Configuration Tasks Setting Up Additional Features Performing Maintenance Tasks.
Copyright © 2013, SAS Institute Inc. All rights reserved. SAS GLOBAL FORUM: NEW & NOTEWORTHY MATT MALCZEWSKI – COMMUNITIES MANAGER.
2. SQL Security Objectives –Learn SQL Server 2000 components Contents –Understanding the Authentication Process –Understanding the Authorization Process.
Permissions Lesson 13. Skills Matrix Security Modes Maintaining data integrity involves creating users, controlling their access and limiting their ability.
Master Data Management & Microsoft Master Data Services Presented By: Jeff Prom Data Architect MCTS - Business Intelligence (2008), Admin (2008), Developer.
All about Revolution R Enterprise
Mirek Sztajno SQL Server Security PM
Learningcomputer.com SQL Server 2008 –Views, Functions and Stored Procedures.
Basics of JDBC Session 14.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
SSMS SQL Server Management System. SQL Server Microsoft SQL Server is a Relational Database Management System (RDBMS) Relational Database Management System.
Exploring R Services and Advanced Analytics
Introduction to SQL Server  Working with MS SQL Server and SQL Server Management Studio.
Introduction to SQL Server for Windows Administrators Presented to WiNSUG 02/05/09 Bret Stateham Owner, Net Connex Blogs.netconnex.com.
1 BCS 4 th Semester. Step 1: Download SQL Server 2005 Express Edition Version Feature SQL Server 2005 Express Edition SP1 SQL Server 2005 Express Edition.
Introduction to R and Data Science Tools in the Microsoft Stack Jamey Johnston.
Blog: R YOU READY FOR.
Apache Hadoop on Windows Azure Avkash Chauhan
Putting Your Head in the Cloud Working with SQL Azure David Postlethwaite 18/06/2016David Postlethwaite.
Blog: R YOU READY FOR.
Database Development with SQL Server Data Tools (SSDT) Björn Eriksen, Architect Evangelist DPE Microsoft
Introduction to R and Data Science Tools in the Microsoft Stack Jamey Johnston.
Machine Learning with SQL Server 2016 & R Dinesh Asanka Senior Architect – Technology VirtusaPolaris.
9/24/2017 7:27 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
SQL Database Management
Building 1 million predictions per second using SQL-R
Introduction to R and Data Science Tools in the Microsoft Stack
Introduction to R and Data Science Tools in the Microsoft Stack
SQL 2016 R Services a.k.a. leveraging your local data lake
Working with SQL Server for Linux Cross-Platform
What’s new in SQL Server 2017 for BI?
Data Virtualization Demoette… ADO.NET Client
Data Virtualization Community Edition
Bridging the Data Science and SQL Divide for Practitioners
Intro to R & MS Data Science Tools
6/16/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
R in Power BI.
Leveraging BI in SharePoint with PowerPivot and Power View
Solving the Hard Problems
Introduction to R Programming with AzureML
Welcome! Power BI User Group (PUG)
What Power BI users need to know about R
ISC440: Web Programming 2 Server-side Scripting PHP 3
Making PowerShell Useful
Thank you Sponsors.
Installing Packages Introduction to R, Part II
Predictive Models with SQL Server Machine Learning Services
Data analysis with R and the tidyverse
Michelle Haarhues Keeping up with SSMS.
Presentation transcript:

Blog: R YOU READY FOR SQL 2016? John Pertell Database Administrator for Dialysis Clinics Inc SQL Server R Services (RC2)

WHO I AM... Working for DCI since 2000 Started as Access report writer Have been Senior DBA since 2006

WHO I AM...NOT! I am not an “R” tist

Agenda A little R background Quick look at basic R Microsoft and R Microsoft R Open (MRO) Microsoft R Server R and SQL 2016 What is it Installing and configuring Using R and SQL 2016

A Little R Background Open source language used for working with data (statistics, analysis, visualization) One of the fastest growing, most popular languages for data scientists Connects to many data sources Runs on multiple platforms Available from the CRAN repository Constantly growing

A Little “R”efresher Basic atomic classes of objects Character Numeric Integer Logical (True or False) Most basic object is a vector Can only contain objects of the same class (character, etc) But you can create a list with different classes

A Little “R”efresher Other object types: Matrix – vectors with dimensions Each element must be the same object class Factors – represent categorical data Useful for modeling data Use labels (“Yes”, “No”) instead of integer(1, 2) Data Frames – stores tabular data Can store different object classes

A Little “R”efresher - Syntax #Comments# This is a comment <- or =Assignment (<- is preferred)a <- 1 or b = 2 a[1]First element in a vectora[1] df[, ]Select data frame elementdf[, 1] = all rows in first column df[1, ] = first row in all columns c()Concatenationa <- c(1, 2, 3, 4, 5) :Sequencea <- c(1:5), same as above

A Little “R”efresher - Packages install.packages(“package name”, lib = “path”) lib = optional, path where package is installed May be asked for mirror path library(package name, lib.loc = “path”) – load package for use Lib is optional Some popular packages ggplot2 – plots dplyr – manipulating data RODBC – connections to ODBC data sources

R Demo

Microsoft and R

Microsoft acquires Revolution Analytics in early 2015 Announce integration of R and SQL 2016 Platinum member of R Consortium MRAN (Microsoft R Application Network) Microsoft and R

Free and open source R distribution Enhanced version of base R released by Revolution Analytics Performance Multithreading (available through MKL) Package Time Machine (checkpointing) for reproducible code Same functionality and access to R packages Use any IDE to run scripts Microsoft R Open

Microsoft R Open – Performance Comparison SOURCE:

Microsoft R Server Multi-platform (Windows, Linux, Hadoop, Teradata) Parallel and chunked data processing Work with larger data sets than base R

Microsoft R Server

R Service (In-Database) Advanced Analytics Extension R scripts executed through system stored procedure Close to the data Use plots in SSRS SQL 2016 R Service

SOURCE:

Enable R Services (In-Database) when installing Download and install RRO for RRE 7.5 PRE RC2 Download and install the server installation package for RRE 7.5 PRE RC2 EXEC sp_configure ‘external scripts enabled’, 1 "%programfiles%\RRO\RRO for-RRE-7.5.0\R \library\RevoScaleR\rxLibs\x64\registerRext.exe" /install Add /instance:SQLNamedInstance for named instances PRE RC2 SQL 2016 R Service

Configure Launchpad Service \binn\Rlauncher.config MEMORY_LIMIT_PERCENT (default is 20%) TRACE_LEVEL (default is 1) USER_POOL_SIZE (default is 10) Read only setting. Change by re-running RegisterRExt.exe Other settings -- MSDN says don’t change WORKING_DIRECTORY – for R sessions JOB_CLEANUP_ON_EXIT – default is 1 LOG_DIRECTORY -- RHOME, MPI_HOME – directories for RRO and MPI

Configure RegisterRext.exe.config %programfiles%\RRO\RRO for-RRE-7.5.0\R \library\RevoScaleR\rxLibs\x64\RegisterRext.exe.config Rerun registerRext.exe /uninstall (if you’re already run it once) Rerun registerRext.exe /install

Packages Default location C:/Program Files/RRO/RRO for-RRE-7.5.0/R /library Must install new packages as administrator Permissions Add account to db_rrerole database role in master In database: GRANT EXECUTE ANY EXTERNAL SCRIPT TO

EXEC = = N’Your R code goes = N’’, = N’’], = N’’], = 0 | 1], = data_type [ OUT | OUTPUT ] [,...n ]' ], = 'value1' [ OUT | OUTPUT ] [,...n ] ] WITH RESULT_SETS ( {column_name, data_type [,,,n]} {UNDEFINED} {NONE})

EXEC sp_execute_external_script… RESULT SET must be a data frame from R Only 1 RESULT SET allowed (may be more soon) Only 1 input_data Possible workaround – package inside your R code SQL columns can’t be certain data types (nchar, nvarchar, cursor). Convert before sending to R Certain columns can’t recognized by R (AlwaysEncrypted, Masked) Possible work around – put in temp table first.

SQL 2016 R Demos

SQL 2016 R Known Issues Parallel execution not in CTP – Fixed in RC No output parameters in sp_execute_external_script – Fixed in RC Possible loss of precision between some R and SQL data types. Only 1 raw value can be returned – multiple outputs planned

Summary - 1 Microsoft acquired Revolution Analytics in 2015 Revolution R Open - Microsoft R Open(MRO) Free, open source, enhanced version of R Easier multithreading Package Time Machine with checkpoint Revolution R Enterprise - SQL 2016 R Server & Microsoft R Server Advanced Analytics Extensions Run R code in database through system stored procedure Return results and plots to application

Summary - 2 Choose R (In Database)feature during SQL install Install RRO and RRE (before RC2 or if server has no internet) Sp_configure ‘external_scripts_enabled’, 1 Configure Rlaunchpad for memory Configure RegisterRext.exe.config for user account sessions Run R code through sp_execute_external_script Only 1 input and 1output R must return data frame

References MSDN: SQL Server R Services MSDN: Getting Started with SQL Server R Services MSDN: sp_execute_external_script (Transact-SQL) MSDN: Configure and Manage Advanced Analytics Extensions Microsoft R Application Network (MRAN)

References – 2 MSSQL Tips: Koen Verbeeck – SQL Server 2016 R Services SQL Server R Services Tutorials AdventureWorks Sample Databases and Scripts for SQL Server 2016 CTP3 R Tools for Visual Studio beta

References – 3 Comprehensive R Archive Network (CRAN) R Tutorial R Cheatsheets

THANK YOU! John Pertell Blog: