From 4ac016d342dcbca85d4033d1ec9c26ef1097a9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Mon, 23 Dec 2024 22:58:15 +0000 Subject: [PATCH] ch: set ignore_materialized_views_with_dropped_target_table to true --- flow/connectors/clickhouse/clickhouse.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/flow/connectors/clickhouse/clickhouse.go b/flow/connectors/clickhouse/clickhouse.go index de8b2461f3..ff77a74ba5 100644 --- a/flow/connectors/clickhouse/clickhouse.go +++ b/flow/connectors/clickhouse/clickhouse.go @@ -229,8 +229,12 @@ func Connect(ctx context.Context, env map[string]string, config *protos.Clickhou tlsSetting.RootCAs = caPool } - // See: https://clickhouse.com/docs/en/cloud/reference/shared-merge-tree#consistency - settings := clickhouse.Settings{"select_sequential_consistency": uint64(1)} + settings := clickhouse.Settings{ + // See: https://clickhouse.com/docs/en/cloud/reference/shared-merge-tree#consistency + "select_sequential_consistency": uint64(1), + // broken downstream views should not interrupt ingestion + "ignore_materialized_views_with_dropped_target_table": true, + } if maxInsertThreads, err := peerdbenv.PeerDBClickHouseMaxInsertThreads(ctx, env); err != nil { return nil, fmt.Errorf("failed to load max_insert_threads config: %w", err) } else if maxInsertThreads != 0 {