Enterprise Integration Zone is brought to you in partnership with:

Tharindu holds a first class honors degree in computer science and engineering from the University of Moratuwa, Sri Lanka. He also received a professional postgraduate diploma in marketing from the CIM, UK, where he is an associate member. Tharindu currently works at WSO2. He is a Associate Tech Lead and a member of the data technologies management committee, focusing on big data, analytics, and business activity monitoring (BAM). Tharindu is a DZone MVB and is not an employee of DZone and has posted 15 posts at DZone. You can read more from them at their website. View Full User Profile

A CSV Connector for WSO2 BAM

11.27.2012
| 2768 views |
  • submit to reddit

I’ve worked on a small tool to publish your spreadsheets (after converting to CSVs of course!) to WSO2 BAM.

The cool thing is you can publish 1 (or 1000s) of spread sheets to WSO2 BAM, and use the HiveAnalytics UI to slice and dice them to produce neat results.

So, you need maven to build and run this (and of course, WSO2 BAM up and running). Here are the steps:

1. Download and unzip the source from this link.

2. Run ‘mvn clean install’ at the unzipped location.

3. Now run the exec command in maven as per the following example: ‘mvn exec:java -Dexec.mainClass=org.wso2.carbon.bam.CSVAgent -DcsvFile=../ExportCustomerAccounts.csv -DstreamName=CustomerAccounts -DstreamVersion=1.2.0′

Here is what happens:

“CustomerAccounts” is the stream that will get created out of the CSV file, “ExportCustomerAccounts.csv”. All streams are versioned in BAM, so this stream will have the version “1.2.0″. Versioning means you can publish different versions of the CSV (columns deleted or added) with different versions.

The potential of this is you can publish any number of CSVs to BAM and make use of the SQL-like Hive query language to do joins and group bys to get valuable information out of your spread sheets.

Published at DZone with permission of Tharindu Mathew, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)