From 09ed3c4b81de0ae912a00a2cfb6d7849e3f8dc99 Mon Sep 17 00:00:00 2001 From: Eric Radman Date: Thu, 31 Jul 2025 08:07:40 -0400 Subject: [PATCH] Clickhouse: do not display INFORMATION_SCHEMA tables (#7489) As with other query runners, do not show system tables in the schema list. --- redash/query_runner/clickhouse.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/redash/query_runner/clickhouse.py b/redash/query_runner/clickhouse.py index a44365923..9d7a1379f 100644 --- a/redash/query_runner/clickhouse.py +++ b/redash/query_runner/clickhouse.py @@ -77,7 +77,11 @@ class ClickHouse(BaseSQLQueryRunner): self._url = self._url._replace(netloc="{}:{}".format(self._url.hostname, port)) def _get_tables(self, schema): - query = "SELECT database, table, name FROM system.columns WHERE database NOT IN ('system')" + query = """ + SELECT database, table, name + FROM system.columns + WHERE database NOT IN ('system', 'information_schema', 'INFORMATION_SCHEMA') + """ results, error = self.run_query(query, None)