none
Want to start testing olapR package RRS feed

  • Question

  • Hello,

    I want to connect to some olap cubes with R. From this link it sounds fairly simple, but we cannot find the olapR package on CRAN or MRAN.

    https://docs.microsoft.com/en-us/sql/advanced-analytics/r-services/using-data-from-olap-cubes-in-r

    Thanks in advance

    D

    Friday, April 7, 2017 10:06 PM

Answers

  • olapR package is only shipped with RClient. You might want to install that from https://msdn.microsoft.com/en-us/microsoft-r/r-client-get-started and then get started.
    • Marked as answer by Dfrizze Thursday, September 14, 2017 4:33 PM
    Wednesday, April 26, 2017 5:11 PM

All replies

  • olapR package is only shipped with RClient. You might want to install that from https://msdn.microsoft.com/en-us/microsoft-r/r-client-get-started and then get started.
    • Marked as answer by Dfrizze Thursday, September 14, 2017 4:33 PM
    Wednesday, April 26, 2017 5:11 PM
  • Hi Vijay,

    We have tried tried Microsoft R client , but we could not see olapR packages on it. Could you help us?

    ==

    Loading Microsoft R Client packages, version 3.3.3.0059.
    Microsoft R Client limits some functions to available memory.
    See: https://msdn.microsoft.com/en-us/microsoft-r-client-windows for information
    about additional features.

    Type 'readme()' for release notes, privacy() for privacy policy, or
    'RevoLicense()' for licensing information.

    Using the Intel MKL for parallel mathematical computing(using 4 cores).
    Default CRAN mirror snapshot taken on 2017-03-15.
    See: https://mran.microsoft.com/.

    > library(olapR)
    Error in library(olapR) : there is no package called ‘olapR’
    >

    ==

    Wednesday, June 28, 2017 12:23 PM
  • What is the output from the following R command?

    row.names(installed.packages())

    It appears that you may have a corrupted install of Microsoft R Client; try removing it and re-installing. The olapR package should appear in the vector of package names returned by the above command.

    Cheers,

    Rich Calaway

    Microsoft R Product Team

    Wednesday, June 28, 2017 9:23 PM
  • Hi Rich,

    Thanks for your update.

    I have re-installed the package, but it still showing same result. Below mentioned Microsoft KB  procedure which I followed to install Microsoft R Client.

    https://msdn.microsoft.com/en-us/microsoft-r/r-client-install-linux

    > row.names(installed.packages())
     [1] "base"             "boot"             "checkpoint"       "class"
     [5] "cluster"          "codetools"        "CompatibilityAPI" "compiler"
     [9] "curl"             "datasets"         "deployrRserve"    "doParallel"
    [13] "doRSR"            "foreach"          "foreign"          "graphics"
    [17] "grDevices"        "grid"             "iterators"        "jsonlite"
    [21] "KernSmooth"       "lattice"          "MASS"             "Matrix"
    [25] "methods"          "mgcv"             "MicrosoftML"      "MicrosoftR"
    [29] "mrsdeploy"        "mrupdate"         "nlme"             "nnet"
    [33] "parallel"         "png"              "R6"               "RevoIOQ"
    [37] "RevoMods"         "RevoPemaR"        "RevoScaleR"       "RevoTDUtils"
    [41] "RevoTreeView"     "RevoUtils"        "RevoUtilsMath"    "rpart"
    [45] "RUnit"            "spatial"          "splines"          "stats"
    [49] "stats4"           "survival"         "tcltk"            "tools"
    [53] "utils"

    > library(olapR)
    Error in library(olapR) : there is no package called ‘olapR’

    I could confirm that, it is not corrupted while install the MRC. Could you check the below installation log and correct me if I am wrong.

    ==

    [root@xxx MRC_Linux]# ls
    DEB  EULA.txt  install.sh  logs  microsoft-r-open  MKL_EULA.txt  MRO_EULA.txt  RPM
    [root@xx MRC_Linux]# ./install.sh
    Using cached MRO that has already been downloaded to:
      /tmp/MRC_Linux/microsoft-r-open

    Press [Enter] key to display the Microsoft R Client license. When finished reading, press q to continue:
    Do you agree to the terms of the previously displayed license
    choose [y]es|[n]oy


    By using Microsoft R you agree to the privacy policy which includes anonymous usage collection.
    You can opt-out anytime by typing rxPrivacyControl(FALSE) in the R console.
    To view Microsoft's privacy policy, type privacy() in the R console.


    We did not detect a Hadoop environment variable. If you would like
    to install the Hadoop package, pass -p to this installer

    Supported .NET Core OS found. Installing .NET core, Operationalization, and Microsoft ML
    Checking for RPM package microsoft-r-open-mro-3.3
    Installing /tmp/MRC_Linux/microsoft-r-open/rpm/microsoft-r-open*.rpm...done
    Installing /tmp/MRC_Linux/RPM/microsoft-r-client-packages-3.3.rpm...done
    Installing /tmp/MRC_Linux/RPM/microsoft-r-client-mml-3.3.rpm...done

    Thank you for installing Microsoft R Client.
    You will find logs for this installation in
    /tmp/MRC_Linux/logs/20170629-094424.log

    [root@xxx MRC_Linux]# R

    R version 3.3.3 (2017-03-06) -- "Another Canoe"
    Copyright (C) 2017 The R Foundation for Statistical Computing
    Platform: x86_64-pc-linux-gnu (64-bit)

    R is free software and comes with ABSOLUTELY NO WARRANTY.
    You are welcome to redistribute it under certain conditions.
    Type 'license()' or 'licence()' for distribution details.

      Natural language support but running in an English locale

    R is a collaborative project with many contributors.
    Type 'contributors()' for more information and
    'citation()' on how to cite R or R packages in publications.

    Type 'demo()' for some demos, 'help()' for on-line help, or
    'help.start()' for an HTML browser interface to help.
    Type 'q()' to quit R.

    Microsoft R Open 3.3.3
    The enhanced R distribution from Microsoft
    Microsoft packages Copyright (C) 2017 Microsoft

    Loading Microsoft R Client packages, version 3.3.3.0059.
    Microsoft R Client limits some functions to available memory.
    See: https://msdn.microsoft.com/en-us/microsoft-r-client-windows for information
    about additional features.

    Type 'readme()' for release notes, privacy() for privacy policy, or
    'RevoLicense()' for licensing information.

    Using the Intel MKL for parallel mathematical computing(using 4 cores).
    Default CRAN mirror snapshot taken on 2017-03-15.
    See: https://mran.microsoft.com/.

    > row.names(installed.packages())
     [1] "base"             "boot"             "checkpoint"       "class"
     [5] "cluster"          "codetools"        "CompatibilityAPI" "compiler"
     [9] "curl"             "datasets"         "deployrRserve"    "doParallel"
    [13] "doRSR"            "foreach"          "foreign"          "graphics"
    [17] "grDevices"        "grid"             "iterators"        "jsonlite"
    [21] "KernSmooth"       "lattice"          "MASS"             "Matrix"
    [25] "methods"          "mgcv"             "MicrosoftML"      "MicrosoftR"
    [29] "mrsdeploy"        "mrupdate"         "nlme"             "nnet"
    [33] "parallel"         "png"              "R6"               "RevoIOQ"
    [37] "RevoMods"         "RevoPemaR"        "RevoScaleR"       "RevoTDUtils"
    [41] "RevoTreeView"     "RevoUtils"        "RevoUtilsMath"    "rpart"
    [45] "RUnit"            "spatial"          "splines"          "stats"
    [49] "stats4"           "survival"         "tcltk"            "tools"
    [53] "utils"
    > library(olapR)
    Error in library(olapR) : there is no package called ‘olapR’
    >

    ==

    Thanks,

    Al Ameen


    • Edited by Nav Ameen Thursday, June 29, 2017 1:56 PM
    Thursday, June 29, 2017 1:54 PM
  • Ah! The olapR package is included only with Microsoft R Client/Server on _Windows_...it is not currently part of our Linux client. Sorry!

    Cheers,

    Rich Calaway

    Microsoft R Product Team

    Friday, June 30, 2017 6:29 PM
  • We have successfully installed and connected to our cubes with olapR, but we are facing a problem with the returned values. The character encoding from the execute2D(olapCnn, mdx_query) call is producing odd results.

    [Disease].[Disease].[Disease].[MEMBER_CAPTION]  [Measures].[Case Count]
    1                                                             \034                      12
    2                                                             \021                       2
    3                                                             \034                    1679
    4                                                             \021                       1
    5                                                             \026                     194
    6                                                             \034                     527
    7                                                             \034                      65
    8                                                             \034                    1382
    9                                                             \034                     170
    10                                                            \034                      42
    11                                                            \034                     781

    We are not sure why this is occurring or how to get the correct results

    Thank you

    Darren

    Friday, September 1, 2017 10:22 PM