File tree Expand file tree Collapse file tree 4 files changed +47
-0
lines changed
client/app/assets/images/db-logos Expand file tree Collapse file tree 4 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ Redash supports more than 35 SQL and NoSQL [data sources](https://redash.io/help
8484- Python
8585- Qubole
8686- Rockset
87+ - RisingWave
8788- Salesforce
8889- ScyllaDB
8990- Shell Scripts
Original file line number Diff line number Diff line change 1+ from redash .query_runner import register
2+ from redash .query_runner .pg import PostgreSQL
3+
4+
5+ class RisingWave (PostgreSQL ):
6+ @classmethod
7+ def type (cls ):
8+ return "risingwave"
9+
10+ @classmethod
11+ def name (cls ):
12+ return "RisingWave"
13+
14+ def _get_tables (self , schema ):
15+ query = """
16+ SELECT s.nspname as table_schema,
17+ c.relname as table_name,
18+ a.attname as column_name,
19+ null as data_type
20+ FROM pg_class c
21+ JOIN pg_namespace s
22+ ON c.relnamespace = s.oid
23+ AND s.nspname NOT IN ('pg_catalog', 'information_schema', 'rw_catalog')
24+ JOIN pg_attribute a
25+ ON a.attrelid = c.oid
26+ AND a.attnum > 0
27+ AND NOT a.attisdropped
28+ WHERE c.relkind IN ('m', 'f', 'p')
29+
30+ UNION
31+
32+ SELECT table_schema,
33+ table_name,
34+ column_name,
35+ data_type
36+ FROM information_schema.columns
37+ WHERE table_schema NOT IN ('pg_catalog', 'information_schema', 'rw_catalog');
38+ """
39+
40+ self ._get_definitions (schema , query )
41+
42+ return list (schema .values ())
43+
44+
45+ register (RisingWave )
Original file line number Diff line number Diff line change @@ -339,6 +339,7 @@ def email_server_is_configured():
339339 "redash.query_runner.ignite" ,
340340 "redash.query_runner.oracle" ,
341341 "redash.query_runner.e6data" ,
342+ "redash.query_runner.risingwave" ,
342343]
343344
344345enabled_query_runners = array_from_string (
You can’t perform that action at this time.
0 commit comments