Skip to content

Commit

Permalink
Merge pull request #1474 from redpanda-data/mb/sqlserver3
Browse files Browse the repository at this point in the history
connectors: SQL Server connector guide enhancements
  • Loading branch information
bochenekmartin authored Oct 15, 2024
2 parents 4bb77d3 + 27ae620 commit eeee9d3
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
2 changes: 2 additions & 0 deletions backend/pkg/connector/guide/debezium_sqlserver_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func NewDebeziumSQLServerGuide(opts ...Option) Guide {
"database.instance",
"database.names",
"database.query.timeout.ms",
"database.encrypt",
},
},
},
Expand Down Expand Up @@ -100,6 +101,7 @@ func NewDebeziumSQLServerGuide(opts ...Option) Guide {
"snapshot.mode.configuration.based.start.stream",
"snapshot.mode.configuration.based.snapshot.on.schema.error",
"snapshot.mode.configuration.based.snapshot.on.data.error",
"snapshot.fetch.size",
"incremental.snapshot.watermarking.strategy",
"internal.log.position.check.enable",
"decimal.handling.mode",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,24 @@ func KafkaConnectToConsoleDebeziumSQLServerSourceHook(response model.ValidationR
Visible: true,
Errors: []string{},
},
},
model.ConfigDefinition{
Definition: model.ConfigDefinitionKey{
Name: "database.encrypt",
Type: "BOOLEAN",
DefaultValue: "true",
Importance: model.ConfigDefinitionImportanceMedium,
Required: false,
DisplayName: "Database encryption",
Documentation: "By default, JDBC connections to Microsoft SQL Server are protected by SSL encryption. If SSL is not enabled for a SQL Server database, or if you want to connect to the database without using SSL, you can disable SSL",
},
Value: model.ConfigDefinitionValue{
Name: "database.encrypt",
Value: "true",
RecommendedValues: []string{"true", "false"},
Visible: true,
Errors: []string{},
},
})

return KafkaConnectToConsoleTopicCreationHook(KafkaConnectToConsoleJSONSchemaHook(response, config), config)
Expand Down
9 changes: 7 additions & 2 deletions backend/pkg/connector/patch/debezium_mysql_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ type ConfigPatchDebeziumMysqlSource struct {
ConnectorClassSelector IncludeExcludeSelector
}

const (
tableIgnoreBuiltin = "table.ignore.builtin"
tombstonesOnDelete = "tombstones.on.delete"
)

var _ ConfigPatch = (*ConfigPatchDebeziumMysqlSource)(nil)

// NewConfigPatchDebeziumMysqlSource returns a new Patch for the Debezium Mysql source connectors.
Expand Down Expand Up @@ -63,9 +68,9 @@ func (*ConfigPatchDebeziumMysqlSource) PatchDefinition(d model.ConfigDefinition,
d.SetDocumentation("A comma-separated list of regular expressions matching fully-qualified names of columns to exclude from change events")
case "database.allowPublicKeyRetrieval",
"include.schema.changes",
"tombstones.on.delete",
tombstonesOnDelete,
"enable.time.adjuster",
"table.ignore.builtin",
tableIgnoreBuiltin,
"gtid.source.filter.dml.events":
d.SetDefaultValue("true")
case "database.ssl.mode":
Expand Down
7 changes: 7 additions & 0 deletions backend/pkg/connector/patch/debezium_sqlserver_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ func (*ConfigPatchDebeziumSQLServerSource) PatchDefinition(d model.ConfigDefinit
AddRecommendedValueWithMetadata("io.confluent.connect.avro.AvroConverter", "AVRO").
AddRecommendedValueWithMetadata("org.apache.kafka.connect.json.JsonConverter", "JSON").
AddRecommendedValueWithMetadata("io.debezium.converters.CloudEventsConverter", "CloudEvents")
case "transaction.boundary.interval.ms":
d.SetDefaultValue("1000")
case "snapshot.fetch.size":
d.SetDefaultValue("2000")
case "tombstones.on.delete",
"table.ignore.builtin":
d.SetDefaultValue("true")
}

// Importance Patches
Expand Down

0 comments on commit eeee9d3

Please sign in to comment.