You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/10/27 19:09:32 UTC

[GitHub] [kafka] mnegodaev opened a new pull request #11442: KAFKA-7883 add schema.namespace support to SetSchemaMetadata SMT in Kafka Connect

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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] mnegodaev commented on pull request #11442: KAFKA-7883 add schema.namespace support to SetSchemaMetadata SMT in Kafka Connect

Posted by GitBox <gi...@apache.org>.
mnegodaev commented on pull request #11442:
URL: https://github.com/apache/kafka/pull/11442#issuecomment-954654651


   @rhauch could you please review my PR?


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org