Skip to content

Commit

Permalink
use ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed May 20, 2024
1 parent f9113f3 commit e3213b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flow/connectors/clickhouse/normalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit e3213b2

Please sign in to comment.