You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Michael Negodaev (Jira)" <ji...@apache.org> on 2021/10/27 20:10:00 UTC

[jira] [Commented] (KAFKA-7883) Add schema.namespace support to SetSchemaMetadata SMT in Kafka Connect

    [ https://issues.apache.org/jira/browse/KAFKA-7883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17435040#comment-17435040 ] 

Michael Negodaev commented on KAFKA-7883:
-----------------------------------------

Hello [~zThulj] and [~jomach]. I've created [PR|https://github.com/apache/kafka/pull/11442)] with adding a new *_schema.namespace_* attribute which should fix the issue [~jomach] mentioned above.
 I think we should provide a way to transform both schema namespace and schema name separately from each other letting developer to choose which part of the full schema name should change. All the ways should work:
{noformat}
{
  "transforms" : "TransformSchema",
  "transforms.TransformSchema.type" : "org.apache.kafka.connect.transforms.SetSchemaMetadata$Value",
  "transforms.TransformSchema.schema.name" : "my.new.namespace.NewSchemaName"
}
{noformat}

and

{noformat}
{
  "transforms" : "TransformSchema",
  "transforms.TransformSchema.type" : "org.apache.kafka.connect.transforms.SetSchemaMetadata$Value",
  "transforms.TransformSchema.schema.namespace" : "my.new.namespace",
  "transforms.TransformSchema.schema.name" : "NewSchemaName"
}
{noformat}

or

{noformat}
{
  "transforms" : "TransformSchema",
  "transforms.TransformSchema.type" : "org.apache.kafka.connect.transforms.SetSchemaMetadata$Value",
  "transforms.TransformSchema.schema.namespace" : "my.new.namespace"
}
{noformat}
 
Could you please look at that?

> Add schema.namespace support to SetSchemaMetadata SMT in Kafka Connect
> ----------------------------------------------------------------------
>
>                 Key: KAFKA-7883
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7883
>             Project: Kafka
>          Issue Type: New Feature
>          Components: KafkaConnect
>    Affects Versions: 2.1.0
>            Reporter: Jérémy Thulliez
>            Priority: Minor
>              Labels: features
>
> When using a connector with AvroConverter & SchemaRegistry, users should be able to specify the namespace in the SMT.
> Currently, only "schema.version" and "schema.name" can be specified.
> This is needed because if not specified, generated classes (from avro schema)  are in the default package and not accessible.
> Currently, the workaround is to add a Transformation implementation to the connect classpath.
> It should be native.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)