Skip to content

Commit 09ed3c4

Browse files
authored
Clickhouse: do not display INFORMATION_SCHEMA tables (#7489)
As with other query runners, do not show system tables in the schema list.
1 parent f5e2a4c commit 09ed3c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

redash/query_runner/clickhouse.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ def port(self, port):
7777
self._url = self._url._replace(netloc="{}:{}".format(self._url.hostname, port))
7878

7979
def _get_tables(self, schema):
80-
query = "SELECT database, table, name FROM system.columns WHERE database NOT IN ('system')"
80+
query = """
81+
SELECT database, table, name
82+
FROM system.columns
83+
WHERE database NOT IN ('system', 'information_schema', 'INFORMATION_SCHEMA')
84+
"""
8185

8286
results, error = self.run_query(query, None)
8387

0 commit comments

Comments
 (0)