mnegodaev opened a new pull request #11442:
URL: https://github.com/apache/kafka/pull/11442
When you use Kafka Connect and Avro Converter with Schema Registry you may
need to transform your source schema namespace. Currently `SetSchemaMetadata`
provide a way to transform the namespace by specifying in the `schema.name`
attribute both actual namespace being concatenated with the actual schema name:
```javascript
{
"transforms" : "AddNamespace",
"transforms.AddNamespace.type" :
"org.apache.kafka.connect.transforms.SetSchemaMetadata$Value",
"transforms.AddNamespace.schema.name" : "my.new.namespace.NewSchemaName"
}
```
But this way you are forced to specify the schema name even when you want to
preserve the original schema name. In some cases you just may need to replace
possibly an empty namespace of your source with the actual namespace fitting
"your.java.package" and leave schema name as it is.
Moreover as mentioned in KAFKA-7883, when use JDBC connector with multiple
tables in the source database what you may want is to preserve the table names
but specify some non-empty namespace for them.
To support this we have to provide a way to append a schema namespace to the
schema name (doesn't matter being updated or not).
In this PR a new `schema.namespace` attribute is added to
`SetSchemaMetadata` letting developer to decide either to transform namespace
only or transform both schema name and schema namespace by using either
`schema.namespace` together with `schema.name` or just single `schema.name`
attribute.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]