Oracle semi regularly releases a new version of their OBIEE Sample App virtual machine. The most recent versions have had examples of using Oracle R Enterprise built into the demo dashboards. Unfortunately Oracle R Enterprise (ORE) does not work or is enabled in the downloaded version of the OBIEE VM, but with a few small steps you can enable ORE and have the examples in the OBIEE dashboard working for you. The purpose of this article is to walk you through the steps to get ORE setup and running The first thing you need to do, if you haven’t already, is to download the OBIEE Sample App VM. You can download it here. http://www.oracle.com/technetwork/middleware/bi-foundation/obiee-samples-167534.html. The latest version (v511) of the OBIEE Sample App VM comes with Oracle Business Intelligence 12c. What this means is that there is now lots of cool integration with the R language and with Oracle R Enterprise (ORE). Out of the box ORE (version 1.4.1) is installed and you can start using it if you open an R session or using the ORE embedded features in SQL. I’m sure the next release of the VM will have ORE version 1.5 which has some additional cool stuff. But when you start to use OBIEE you will be using the standard R language. In this case it will be the Oracle R Distribution. If you want to use Oracle R Enterprise (ORE) then you need to make a configuration change. IMPORTANT : Many people refer to a product called R Oracle or Oracle R. Technically there is no product called this. Maybe these people are referring to Oracle R Distribution. So whenever you hear someone say Oracle R, please ask them what actual product they are talking about and watch them stutter and stammer and fumble some sort of answer. If they do this then be careful of the advise they are giving you ! In addition to the configuration changes you will also need to install a number of R packages into the ORE installation. This is a manual step you need to perform due to some licensing issues/restrictions on using these R packages. These R packages will be used in the ORE demonstrations in the Sample App. Step 1 - Install the additional R packages Open a terminal window and go to /home/oracle/scripts/R and run the following command ./install_sampleapp_R_packages.sh This will install lots and lots of R packages onto the VM. Depending on your internet connection speed, this can take 8-20 minutes. For me it was about 8 minutes over wifi at home. Step 2 - Configure OBIEE to use ORE instead of R By default OBIEE is configured to use R in the mid-tier. If you want to switch to using ORE for the in-database features you need to define a connection pool within the RPD. You can do this in the NQSConfig.INI file vi /app/oracle/biee/user_projects/domains/bi/config/fmwconfig/biconfig/OBIS/NQSConfig.INI Scroll down to the Advanced Analytics Script Section. Change Target to use ORE TARGET = "ORE" Then set the name for the Connection Pool. This may already be set, but check it to make sure. After making the changes, you can save and close the file. The final part is to restart the BI Server so that the changes to the NQSConfig.INI file can take effect. The Oracle schema you are connecting to in the Oracle Database needs to have the ORE system privilege called RQADMIN. This is needed to allow the embedded execution of R scripts in the database. Step 3 - Install some ORE embedded R scripts in the Oracle Database To demonstrate the embeded in-database capabilities of Oracle R Enterprise, the OBIEE Sample App VM comes with a number of examples of embedded R scripts. This are fined as XML files on the OBIEE Sample App VM. To access these embedded ORE Scripts you need to go to the following directory. cd /app/oracle/biee/user_projects/domains/bi/bidata/components/OBIS/advanced_analytics/script_repository When you list out the ORE xml files you will get the following list. AAScripts.xsd obiee.AirlineArrDelayPrediction.xml obiee.BalloonPlot.xml obiee.Clustering.xml obiee.Outliers.xml obiee.RegressionCorrelation.xml obiee.RegressionCreateModel.xml obiee.RegressionScoreModel.xml obiee.Regression.xml obiee.RImageEncSplit.xml obiee.RIMage.xml obiee.TimeSeriesForecast.xml obiee.VariableWidthBar.xml Sometimes you see references to 'registering' these scripts. What they actually means that these R scripts get created in the Oracle Database. You can also create R scripts in the database using SQL and PL/SQL, or using some of the ORE R API functions. The next step is to load each of these scripts into the Oracle Database. OBIEE gives us a screen that we can be used. To access this screen open the OBIEE Sample App. Then select Administration menu option at the top of the screen. When the next screen appears, scroll down to the bottom and you will see 'Issue SQL'. Click on this. You can now use this Issue SQL screen to load these ORE xml files. In the SQL box you will need to type in the following command to load each of the files listed above. call NQSRegisterScript('flipper://obiee.AirlineArrDelayPrediction.xml') call NQSRegisterScript('flipper://obiee.BalloonPlot.xml') call NQSRegisterScript('flipper://obiee.Clustering.xml') call NQSRegisterScript('flipper://obiee.Outliers.xml') call NQSRegisterScript('flipper://obiee.RegressionCorrelation.xml') call NQSRegisterScript('flipper://obiee.RegressionCreateModel.xml') call NQSRegisterScript('flipper://obiee.RegressionScoreModel.xml') call NQSRegisterScript('flipper://obiee.Regression.xml') call NQSRegisterScript('flipper://obiee.RImageEncSplit.xml') call NQSRegisterScript('flipper://obiee.RImage.xml') call NQSRegisterScript('flipper://obiee.TimeSeriesForecast.xml') call NQSRegisterScript('flipper://obiee.VariableWidthBar.xml') The following screenshot shows you the call to the obiee.Outliers.xml file and the result that is displayed after the file has been successfully been loaded. Step 4 - Startup OBIEE and try out the demos Now after completing all of the above steps, when you run the Advanced Analytics examples in the Sample App Dashboard you will be running ORE.
↧