Skip to content

Commit

Permalink
Merge branch 'main' into generic-test
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex authored Mar 6, 2024
2 parents a2e2214 + 373bfb2 commit badda72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flow/connectors/clickhouse/qrep_avro_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ func (s *ClickhouseAvroSyncMethod) SyncQRepRecords(
continue
}

selector = append(selector, colName)
selector = append(selector, "`"+colName+"`")
}
selectorStr := strings.Join(selector, ",")
//nolint:gosec
query := fmt.Sprintf("INSERT INTO %s(%s) SELECT * FROM s3('%s','%s','%s', 'Avro')",
config.DestinationTableIdentifier, selectorStr, avroFileUrl,
query := fmt.Sprintf("INSERT INTO %s(%s) SELECT %s FROM s3('%s','%s','%s', 'Avro')",
config.DestinationTableIdentifier, selectorStr, selectorStr, avroFileUrl,
s.connector.creds.AccessKeyID, s.connector.creds.SecretAccessKey)

_, err = s.connector.database.ExecContext(ctx, query)
Expand Down

0 comments on commit badda72

Please sign in to comment.