Git Product home page Git Product logo

nifi-r-bundle's Introduction

nifi-r-bundle

Work in progress

R integration for Apache NIFI.

This library uses the rJava/JRI interface for fast access to R from NIFI. It allows you to use R to write your NIFI processing code.

Sample code

In order to get it to work, this can't act like a standard NIFI processor. It implements a callback that gives you access to 3 interfaces:

  1. inputStream
  2. outputStream
  3. log

This actually works out quite well. You only have to care about reading, writing, and (optionally) logging.

ioutils <- .jnew("org.apache.commons.io.IOUtils")

input <- ioutils$toString(inputStream)

ioutils$write("[{\"name\":\"foo\"},{\"value\":\"bar\"}]", outputStream)

Installing

This document is a work in progress, so this is just to get you started.

You are going to need NIFI, R, Java, and rJava installed.

To run the code, you are going to have to set:

  1. R_HOME as an environment variable to point to your R install
  2. -Djava.library.path or your CLASSPATH to point to the rJava jar files.
  3. Install rJava from CRAN

Status

I just wrote this code and it works here, on my machine, at my home. Still lots of work to do, but it works for me right now at this moment.

nifi-r-bundle's People

Contributors

mrcsparker avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.