The community of Analytics developers are invited to follow and participate in the developer network.
OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

Example of connecting to ElasticSearch using BIRT with a Scripted Data Set

Clement WongClement Wong EM mod
edited May 11, 2016 in DevShare
Here is a very simple example of BIRT connecting to ElasticSearch using a Scriped Data Set. This could also illustrate connecting to a REST based data source with a JSON result set.<br />
<br />
The three events were added:<br />
<br />
Data Source > Open
<br />
Make a query request to ElasticSearch<br />
Save the results in a JSON variable
<br />
<br />
Data Set > Open
<br />
Reset the row counter to zero
<br />
<br />
Data Set > Fetch
<br />
Create a row of data from ElasticSearch for each “hit”<br />
Set the output column field values from the JSON result set<br />
Stop when total hits are reached
<br />
<br />
<br />
Place the helper JavaScript, “json.js”, into the root of the project folder.<br />
<br />
Note: If you are using BIRT 4.5.0, it has built-in JSON support so you don't need the helper JavaScript file, "json.js", in the root of your project folder. The difference between the two designs in the ZIP is that the one for pre-BIRT 4.5.0, there is an external Resources reference to "json.js", and the one for 4.5.0 does not have it. If you don't have it in pre-BIRT 4.5.0, when attempting to run the report, you will see an error like ... ReferenceError: "JSON" is not defined.

Clement Wong
Principal Analytics Architect

OpenText Corporation
http://www.actuate.com | http://www.opentext.com

Comments

Sign In or Register to comment.