. Use BIRT to generate reports from Cassandra

Provide current Cassandra data to your embedded analytics.

esProc integrates Cassandra APIs in an external library, and you can connect to Cassandra with the following simple operations. You can use the esProc with the BIRT (Business Intelligence Reporting Tools) platform to create BIRT reports that reflect changes to your Cassandra data in real time.

1.Install the esProc.

2.Download esProc external libraries, put them in [installation directory]\esproc folder, unzip extlib.zip .

3.Download asm-5.0.3.jar, asm-analysis-5.0.3.jar, asm-commons-5.0.3.jar, asm-tree-5.0.3.jar, asm-util-5.0.3.jar, cassandra-driver-core-3.3.0.jar, cassandra-driver-extras-3.3.0.jar, cassandra-driver-mapping-3.3.0.jar, guava-19.0.jar, HdrHistogram-2.1.9.jar, jackson-core-2.8.8.jar, jackson-databind-2.7.9.1.jar, javax.json-api-1.0.jar, jffi-1.2.10.jar, jffi-1.2.10-native.jar, jnr-constants-0.9.0.jar, jnr-ffi-2.0.7.jar, jnr-posix-3.0.27.jar, jnr-x86asm-1.0.2.jar, joda-time-2.9.1.jar, lz4-1.3.0.jar, metrics-core-3.2.2.jar, netty-all-4.1.17.Final.jar, slf4j-api-1.7.25.jar, snappy-java-1.1.2.6.jar(Get the appropriate jars according to the Cassandra version you are using.) from the web and put them in [installation directory]\esProc\extlib\DatastaxCli folder. 

4.Develop SPL Script in esProc IDE. esProc provides stax_connect(), stax_query(), stax_close() to access the Cassandra. For example,

SPL Script(test.dfx)


A

1

=stax_connect("127.0.0.1";keyspace:"mycas")

2

=stax_query(A1,"select ID,NAME,AGE from mycas.user where id=?",1)

3

=stax_close(A1)

5.Call SPL Script in BIRT. Integrate esProc JDBC with BIRT report designer - put the necessary jars and configuration files in BIRT’s corresponding directory. Create a new report and add esproc JDBC data source. Create a new data set on New Data Set window and select the esProc JDBC data source. The data set type is SQL Stored Procedure Query. The query is:{call test.dfx()}.

View the report in web viewer.

ID

NAME

AGE

1

David

22

2

Thomas

13

3

Jerry

44

Your BIRT reports can now pick up any updates to Cassandra data. For detail information, see How to Call an SPL Script in BIRT.