Skip to content

Commit

Permalink
Merge pull request #822 from redpanda-data/bq-conn-enh
Browse files Browse the repository at this point in the history
Add kafkaKeyFieldName to BigQuery sink connector guide
  • Loading branch information
tomasz-sadura authored Aug 23, 2023
2 parents 76c261d + 24a850d commit 4c2149d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions backend/pkg/connector/guide/bigquery_sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func NewBigQuerySinkGuide(opts ...Option) Guide {
// No Group name and description here
ConfigKeys: append([]string{
"key.converter",
"key.converter.schemas.enable",
"value.converter",
"value.converter.schemas.enable",
"autoCreateTables",
Expand All @@ -52,6 +53,7 @@ func NewBigQuerySinkGuide(opts ...Option) Guide {
"allowBigQueryRequiredFieldRelaxation",
"upsertEnabled",
"deleteEnabled",
"kafkaKeyFieldName",
"timePartitioningType",
"bigQueryRetry",
"bigQueryRetryWait",
Expand Down
8 changes: 5 additions & 3 deletions backend/pkg/connector/patch/bigquery_sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ func (c *ConfigPatchBigQuery) IsMatch(configKey, connectorClass string) bool {
func (*ConfigPatchBigQuery) PatchDefinition(d model.ConfigDefinition, _ string) model.ConfigDefinition {
// Misc patches
switch d.Definition.Name {
case keyConverter:
d.SetImportance(model.ConfigDefinitionImportanceLow)
case valueConverter:
d.ClearRecommendedValuesWithMetadata().
AddRecommendedValueWithMetadata("io.confluent.connect.avro.AvroConverter", "AVRO").
Expand Down Expand Up @@ -82,6 +80,8 @@ func (*ConfigPatchBigQuery) PatchDefinition(d model.ConfigDefinition, _ string)
d.SetDisplayName("Upsert enabled")
case "deleteEnabled":
d.SetDisplayName("Delete enabled")
case "kafkaKeyFieldName":
d.SetDisplayName("Kafka key field name")
case "bigQueryRetry":
d.SetDisplayName("BigQuery retry attempts")
case "bigQueryRetryWait":
Expand All @@ -97,7 +97,9 @@ func (*ConfigPatchBigQuery) PatchDefinition(d model.ConfigDefinition, _ string)
switch d.Definition.Name {
case "keyfile":
d.SetImportance(model.ConfigDefinitionImportanceHigh)
case "autoCreateTables":
case keyConverter,
"autoCreateTables",
"kafkaKeyFieldName":
d.SetImportance(model.ConfigDefinitionImportanceMedium)
}

Expand Down

0 comments on commit 4c2149d

Please sign in to comment.