. Use BIRT to generate reports from Redis

 

Provide current Redis data to your embedded analytics.

esProc integrates Redis APIs in an external library, and you can connect to Redis 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 Redis 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 jedis-2.8.0.jar, log4j-1.2.17.jar, slf4j-api-1.7.7.jar, slf4j-log4j12-1.7.5.jar, commons-pool2-2.0.jar (Get the appropriate jars according to the Redis version you are using.) from the web and put them in [installation directory]\esProc\extlib\RedisCli folder. 

4.Develop SPL Script in esProc IDE. esProc provides redis(),redis_get() and redis_close() to access the Redis. For example,

SPL Script(test.dfx)


A

1

=redis("192.168.18.131:6379","runqian")

2

=redis_get(A1,"id","name","age")

3

=redis_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 Redis data. For detail information, see How to Call an SPL Script in BIRT.