Jump to content

BIRT Developer Center Download


File Information

  • Submitted: Oct 20 2015 09:38 AM
  • Last Updated: May 11 2016 08:18 AM
  • File Size: 7.12KB
  • Views: 7097
  • Downloads: 130
  • Approved by: Clement Wong
  • Approved on: 11 May 2016 - 08:19 AM
  • Summary: Example of connecting to ElasticSearch using BIRT with a Scripted Data Set
  • Content Type: Designs & Code
  • BIRT Version: iHub3, Actuate 11, 4.5, 4.4, 4.3, 4.2, 3.7

Download Querying ElasticSearch with BIRT using a Scripted Data Set

* * * * * 1 Votes
elasticsearch elastic scripted data set rest rest api json

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.

The three events were added:

Data Source > Open

Make a query request to ElasticSearch
Save the results in a JSON variable

Data Set > Open

Reset the row counter to zero

Data Set > Fetch

Create a row of data from ElasticSearch for each “hit”
Set the output column field values from the JSON result set
Stop when total hits are reached

Place the helper JavaScript, “json.js”, into the root of the project folder.

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.

  • 997 Total Files
  • 8 Total Categories
  • 153 Total Authors
  • 31707 Total Downloads
  • Joyplot in iHub Latest File
  • Clement Wong Latest Submitter

0 user(s) are online (in the past 1 minutes)

0 members, 0 guests, 0 anonymous users