Rec Framework

Rec Data Processing Framework

View My GitHub Profile

Rec framework

Rec is a data processing framework focus on stream-based processing for different data source like plain data file/http services/database/message queues.

Get started

Given you have following csv file for employees of a company (employee.csv)

0001, Kimmy Leo  , Software Engineer, 1999/01/09
0002, Graphy Chan, Project Manager  , 1983/07/04
0003, Angilina Y , Tech Consultant  , 1996/13/15

then you want to check their DOB correct or not, what you can do is just write a script(checking.js)

const format = java.lang.String.format;

const rec = require("rec");

rec.csv("employee.csv", "ID, name, job_title, dob")
  .tee(rec.stateless(function({name, dob}) {
    if (dob.split("/")[1] > 12) {
      println(format("Error: employee [%s] has incorrect dob [%s]", 
        name, dob));
    }
  })).to(rec.dummy());

Put the script file and data file under same directory, and just simply run:

java -jar rec-core.jar checking.js

and the output should be:

=> Rec v2
Error: employee [Angilina Y] has incorrect dob [1996/13/15]

Documentations

You can see guide or API document for details.

For more receipts, you can refer Best practices.

See news for update.

Contact

Rec-framework, PowerRec and rec-cloud projects are maintained by KimmyLeo.

For advanced consulting & service, please contact E-mail: kimmy#typecons.com (replace # with @).