I need to configure Apache ignite in Redash for BI dashboard but couldn't figure out how to do the same since there is no direct support for ignite in Redash.
Asked
Active
Viewed 365 times
1 Answers
3
It is possible using Python query runner, which is available for stand-alone installs only. It allows you to run arbitrary Python code, in which you can query Apache Ignite via JDBC.
First, add redash.query_runner.python
query runner to settings.py
:
and install Python JDBC bridge module together with dependencies:
sudo apt-get install python-setuptools
sudo apt-get install python-jpype
sudo easy_install JayDeBeApi
Then after VM restart you should add Python data source (you might need to tweak module path):
And then you can actually run the query (you will need to provide Apache Ignite core JAR and JDBC connection string as well):
import jaydebeapi
conn = jaydebeapi.connect('org.apache.ignite.IgniteJdbcThinDriver', 'jdbc:ignite:thin://localhost', {}, '/home/ubuntu/.m2/repository/org/apache/ignite/ignite-core/2.3.2/ignite-core-2.3.2.jar')
curs = conn.cursor()
curs.execute("select c.Id, c.CreDtTm from TABLE.Table c")
data = curs.fetchall()
result = {"columns": [], "rows": []}
add_result_column(result, "Id", "Identifier", "string")
add_result_column(result, "CreDtTm", "Create Date-Time", "integer")
for d in data:
add_result_row(result, {"Id": d[0], "CreDtTm": d[1]})
Unfortunately there's no direct support for JDBC in Redash (that I'm aware of) so all that boilerplate is needed.

alamar
- 18,729
- 4
- 64
- 97
-
Thank you @Alamar for the quick response. – Sandeep Jakkula Jul 11 '18 at 04:32
-
I am having difficulty in installing Redhat similar below packages. sudo apt-get install python-setuptools sudo apt-get install python-jpype sudo easy_install JayDeBeApi, I am able to see python in datasources but its giving jaydebeapi module issues, and also i cannot see .egg jaydebeapi file in python location, i can only see egg.info files – Sandeep Jakkula Jul 19 '18 at 05:34
-
@Sandy you will have to figure out how to install those modules. `yum` perhaps instead of `apt-get`? – alamar Jul 19 '18 at 09:02