Use LindormTable with Redash
Redash is an open-source BI tool that provides web-based database querying and data visualization. This topic explains how to connect Redash to LindormTable.
Prerequisites
You have installed Redash.
Install the plugin
If you deploy Redash using a Docker image, you must use the
/appdirectory in theredash_server,redash_scheduler,redash_adhoc_worker, andredash_scheduled_workercontainers as the$REDASH_SETUP_FOLDER.Download the
Lindorm.pngandlindorm.pyfiles from the redash repository.Copy the
Lindorm.pngfile to the$REDASH_SETUP_FOLDER/client/app/assets/images/db-logos/and$REDASH_SETUP_FOLDER/client/dist/images/db-logos/directories.Copy the
lindorm.pyfile to the$REDASH_SETUP_FOLDER/redash/query_runner/directory.Add the following line to the
$REDASH_SETUP_FOLDER/redash/settings/__init__.pyfile.default_query_runners = [ 'redash.query_runner.athena', 'redash.query_runner.big_query', ........ 'redash.query_runner.uptycs', 'redash.query_runner.lindorm', # Add this line ]Restart Redash.
If you deploy Redash from source code, set
$REDASH_SETUP_FOLDERas the root directory of the code.
Configure a data source
Log on to Redash.
Click the settings icon
in the upper-right corner of the page.On the Data Sources tab, click New data source.
On the New data source page, click the Lindorm icon.
Specify the Lindorm endpoint, port, username, and password.
NoteUse the CQL endpoint and port.
Click Create.
You can click Test Connection to test the connection.
Example
This example creates a line chart that displays temperature changes over time in different cities. The table uses the following columns: temp (temperature), local_time (measurement time), city, and id.
CREATE TABLE log.temp
(
local_time timestamp,
temp int,
id int,
city text,
primary key ((id))
)In the query editor, run the following CQL statement.
SELECT city, temp, local_time FROM tempThe query result table contains three columns,
city,temp, andlocal_time, and about 10 rows of data, showing the temperature values (such as 14.00, 5.00, 13.00, 17.00, 21.00, 29.00, and 27.00) and corresponding timestamps (with the date as 18/05/21 and the time from 07:09 to 07:38) for the cities of Shanghai, Beijing, and Hangzhou.Click New Visualization.
Set X Column to
local_time, Y Columns totemp, and Group by tocity.