SQL 2016 R Syntax?

  • I can't find documentation for the R-Integration features. Could anyone point me in the right direction to get the syntax for this? Our Data Science team is chomping at the bit to try this out and I'm coming up empty.

  • Check this:

    http://blog.revolutionanalytics.com/2015/05/r-in-sql-server.html

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • And still.... even after all of that, nothing to handle true CSV with text qualifiers that work for the way that Excel exports CSV or even TSV. What a pity. Guess I'll keep doing it the old fashioned way.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • "R" was not part of CTP2 release of SQL Server 2016.

    It might be coming with the CTP3 release or with the RTM, and followed by the MSDN/Technet articles.

  • Thank you, that would explain it!

    manub22 (6/16/2015)


    "R" was not part of CTP2 release of SQL Server 2016.

    It might be coming with the CTP3 release or with the RTM, and followed by the MSDN/Technet articles.

  • You can test the R integration with SQL Server 2016 now, as its has been released with the beta/preview version i.e. CTP 3.

    Check here: http://blogs.technet.com/b/dataplatforminsider/archive/2015/10/28/sql-server-2016-community-technology-preview-3-0-is-available.aspx

  • Thanks very much for the head's up.

    I have installed CTP 3, and followed the MS instructions for enabling R (including the other installers), but I'm hitting a brick wall when attempting to run a simple test R script. If anyone has seen the below error or could give any pointers, I would be very appreciative.

    Test script:

    EXECUTE sp_execute_external_script

    @language = N'R'

    , @script = N'OutputDataSet <- data.frame(mean(InputDataSet[,1]))'

    , @input_data_1 = N'SELECT 50 as L_Quantity '

    WITH RESULT SETS ((col int not null));

    Results:

    Msg 39021, Level 16, State 1, Line 1

    Unable to launch runtime for 'R' script. Please check the configuration of the 'R' runtime.

    Msg 39019, Level 16, State 1, Line 1

    An external script error occurred:

    Unable to launch the runtime. ErrorCode 0x80070490: 1168(Element not found.).

  • If anyone else runs into issues with this, I believe that the order you install things matters. I was able to get a working R install by going in the following order:

    1) R runtime

    2) R enterprise Node

    3) SQL 2016 with R Extensions

    4) Run the sp_configure script

    5) Finally, run the command line script

    Persistence is key!

    Ernest Libertucci (11/1/2015)


    Thanks very much for the head's up.

    I have installed CTP 3, and followed the MS instructions for enabling R (including the other installers), but I'm hitting a brick wall when attempting to run a simple test R script. If anyone has seen the below error or could give any pointers, I would be very appreciative.

    Test script:

    EXECUTE sp_execute_external_script

    @language = N'R'

    , @script = N'OutputDataSet <- data.frame(mean(InputDataSet[,1]))'

    , @input_data_1 = N'SELECT 50 as L_Quantity '

    WITH RESULT SETS ((col int not null));

    Results:

    Msg 39021, Level 16, State 1, Line 1

    Unable to launch runtime for 'R' script. Please check the configuration of the 'R' runtime.

    Msg 39019, Level 16, State 1, Line 1

    An external script error occurred:

    Unable to launch the runtime. ErrorCode 0x80070490: 1168(Element not found.).

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply