Skip to content

siddhi-gpl-execution-r

The siddhi-gpl-execution-r extension is an extension to Siddhi that can be used to process events with R scripts.

Find some useful links below:

Latest API Docs

Latest API Docs is 4.0.15.

How to use

Prerequisites for using the feature

For Linux - Download and install R - Install JRI. - Add R_HOME and JRI_HOME as environment variables and export

For UNIX 1. Download and install R. 2. Verify whether the R installation is successful by typing command R in a new terminal. 3. Install JRI.
a. In R console, install by issuing the following command:
install.packages(?rJava?, repos='http://cran.us.r-project.org') This downloads the rJava package, and the downloaded location is shown in the R console. b. In the UNIX terminal, type R CMD INSTALL {{location of downloaded file}}. This installs JRI in the system. c. Set the environment variables. d. Get the R_home location via the R console by issuing the following command:
R.home(component="home")
The output should be similar\ to /Library/Frameworks/R.framework/Resources. e. Add the above result to an environment variable by issuing the following command:
R_HOME f. To export the variable, issue the following command:
export R_HOME JRI location should be a location similar to the following:
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rJava/jri/ g. Add the above result to an environment variable by issuing the following command:
JRI_HOME h. Export the JRI_HOME.

Using the extension in WSO2 Stream Processor

  • You can use this extension in the latest WSO2 Stream Processor that is a part of WSO2 Analytics offering, with editor, debugger and simulation support.

  • You can use this extension after copying the component jar to the <STREAM_PROCESSOR_HOME>/lib directory.

Using the extension as a java library

  • This extension can be added as a maven dependency along with other Siddhi dependencies to your project.
     <dependency>
        <groupId>org.wso2.extension.siddhi.gpl.execution.r</groupId>
        <artifactId>siddhi-gpl-execution-r</artifactId>
        <version>x.x.x</version>
     </dependency>

Jenkins Build Status


Branch Build Status
master Build Status

Features

  • eval (Stream Processor)

    The R Script Stream Processor runs the R script defined within the Siddhi application to each event and produces aggregated outputs based on the input variable parameters provided and the expected output attributes.

  • evalSource (Stream Processor)

    The R source Stream processor runs the R script loaded from a file for each event and produces aggregated outputs based on the input variable parameters provided and the expected output attributes.

How to Contribute

Contact us

Support

  • We are committed to ensuring support for this extension in production. Our unique approach ensures that all support leverages our open development methodology and is provided by the very same engineers who build the technology.

  • For more details and to take advantage of this unique opportunity contact us via http://wso2.com/support/.