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 2022/06/17 09:20:08 UTC

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

pjmagee commented on code in PR #11442:
URL: https://github.com/apache/kafka/pull/11442#discussion_r899937599


##########
connect/transforms/src/main/java/org/apache/kafka/connect/transforms/SetSchemaMetadata.java:
##########
@@ -35,29 +37,34 @@
     private static final Logger log = LoggerFactory.getLogger(SetSchemaMetadata.class);
 
     public static final String OVERVIEW_DOC =
-            "Set the schema name, version or both on the record's key (<code>" + Key.class.getName() + "</code>)"
-                    + " or value (<code>" + Value.class.getName() + "</code>) schema.";
+            "Set the name, namespace and version on the schema of the record's key " +
+                    "(<code>" + Key.class.getName() + "</code>) or value " +
+                    "(<code>" + Value.class.getName() + "</code>).";
 
     private interface ConfigName {
         String SCHEMA_NAME = "schema.name";
+        String SCHEMA_NAMESPACE = "schema.namespace";
         String SCHEMA_VERSION = "schema.version";
     }
 
     public static final ConfigDef CONFIG_DEF = new ConfigDef()
             .define(ConfigName.SCHEMA_NAME, ConfigDef.Type.STRING, null, ConfigDef.Importance.HIGH, "Schema name to set.")
+            .define(ConfigName.SCHEMA_NAMESPACE, ConfigDef.Type.STRING, null, ConfigDef.Importance.HIGH, "Namespace to append to the schema name.")

Review Comment:
   Or just setting the entire value. Not prepending or appending a value. Would we not be setting a non-existing "namespace" field in the avro schema? With our jdbc connector, it doesnt create the namespace field at all. Its only if the schema name contains a '.' that it produces one.



-- 
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