Skip to content

Commit

Permalink
Ignore non MergeTree tables
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAkulov committed Sep 10, 2019
1 parent 06b5c74 commit 8646a73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8646a73

Please sign in to comment.