diff --git a/flow/connectors/clickhouse/normalize.go b/flow/connectors/clickhouse/normalize.go index 8c0f16737c..550da1ae86 100644 --- a/flow/connectors/clickhouse/normalize.go +++ b/flow/connectors/clickhouse/normalize.go @@ -8,6 +8,7 @@ import ( "strconv" "strings" + "github.com/ClickHouse/clickhouse-go/v2" "github.com/PeerDB-io/peer-flow/datatypes" "github.com/PeerDB-io/peer-flow/generated/protos" "github.com/PeerDB-io/peer-flow/model" @@ -257,7 +258,8 @@ func (c *ClickhouseConnector) normalizeTableRecords( q := insertIntoSelectQuery.String() c.logger.Info("[clickhouse] insert into select query " + q) - _, err := c.database.ExecContext(ctx, q) + insertSelectQueryCtx := clickhouse.Context(ctx, clickhouse.WithSettings(ClickhouseQuerySettings)) + _, err := c.database.ExecContext(insertSelectQueryCtx, q) if err != nil { return fmt.Errorf("error while inserting into normalized table: %w", err) }