Hi,
The requirement is to display the data from ALL Indexes in one single report from Elasticsearch. I have jdbc to query the elasticsearch so that not issue....
Now in elasticsearch the index name are stored like this "PQ_".
So baically I will have to do a UNION of all tables. For example if there are 5 indexes in the elsticsearch, then the report query to display the data would be something like this:
SELECT * FROM PQ_20160101
UNION
SELECT * FROM PQ_20160102
UNION
SELECT * FROM PQ_20160103
UNION
SELECT * FROM PQ_20160104
UNION
SELECT * FROM PQ_20160105
So I have created 2 Data Sets.
- Index Data Set (SELECT schnamName||'.'||tableName FROM sys_tables).
I want to populate an array dynamically with all the tableNames fetched from database and then want to store the array using the script onFetch event.
Result Data Set
In the beforeOpen script, I am trying to retrieve the index array populated by first DataSet.
I will write a for loop to traverse through the index array and here dynamically and create the UNION query dynamically
Hope I am able to explain it clearly.
Thanks,
Rakesh