From 8646a73c08e92cd126c397e3b381a68d355b7b16 Mon Sep 17 00:00:00 2001 From: Alexander Akulov Date: Tue, 10 Sep 2019 11:09:48 +0300 Subject: [PATCH] Ignore non MergeTree tables --- clickhouse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clickhouse.go b/clickhouse.go index ef398ef8..61c97a71 100644 --- a/clickhouse.go +++ b/clickhouse.go @@ -104,7 +104,7 @@ func (ch *ClickHouse) Close() error { // GetTables - get all tables info func (ch *ClickHouse) GetTables() ([]Table, error) { var tables []Table - if err := ch.conn.Select(&tables, "SELECT database, name, is_temporary, data_path, metadata_path FROM system.tables WHERE data_path != '' AND is_temporary = 0;"); err != nil { + if err := ch.conn.Select(&tables, "SELECT database, name, is_temporary, data_path, metadata_path FROM system.tables WHERE data_path != '' AND is_temporary = 0 AND engine LIKE '%MergeTree';"); err != nil { return nil, err } for i, t := range tables {