Using R in external scripts
Posts: 39
Joined: Mon Jan 06, 2014 10:36 am

Kognitio and R. Partitioning Strategies

by skkirkham » Fri Jan 31, 2014 2:30 pm

Here is part 3 of series of topics to introduce Kognitio External Scripting using R.

Following on from the basics and controlling script invocations this pdf concentrates on controlling data processing via partitioning strategies. Accompanying examples can be found here.

In part 2 we saw some of the flexibility around script invocation in Kognitio but utilising Kognitio's parallelism to divide large data sets into sensible work streams is where you start to see how the external scripting environment can really make data science tasks fly. Utilising a few key parameters in the script interface makes parallelisation really quite straightforward.

If you are familiar with SQL windowing functionality you'll recognise the syntax structure of the partitioning control used in the script interface. We see that the isolate strategy is probably the most useful with R but the other 3 strategies (default, seperate and mixed) are also introduced. Each strategy is outlined in turn and used to produce the same set of results so you can clearly see the differences between them. When to apply each strategy is also discussed.

If you have thoughts on which strategy to use for different analytical or data manipulation tasks please do share them.

Note: if you haven't done so already you will need to create an R script environment on your Kognitio system. An example of the script environment creation command is

Code: Select all

create script environment RSCRIPT command '/usr/local/R/bin/Rscript --vanilla --slave' 
Kognitio utilises the script version of R called Rscript that is located in the same directory as the standard R executable. The options minimise unnecessary actions and are designed for programs that use R to produce results (such as Kognitio). For more details see cran.r-project document: An Introduction to R. Appendix B: invoking R.
Reply with quote Top

Who is online

Users browsing this forum: No registered users and 1 guest