Hey Guys,
Schema incompatibility error when creating 2 ksqldb tables with same kafka topic
i am posting my full query,
created 2 tables with same topics,
The first query executed without errors, when i created the second table “table_AT_EditorRevokedOEV1”
i am getting the following error
Could not register schema for topic: Schema being registered is incompatible with an earlier schema for
subject “streaming.at.InvitationHistoryOEv1-key”, details: [Incompatibility{type:NAME_MISMATCH, location:/name, message:expected:
io.confluent.ksql.avro_schemas.TableaTEditorsentoev1Key, reader:{“type”:“record”,“name”:“TableaTEditorrevokedoev1Key”,t
“namespace”:“io.confluent.ksql.avro_schemas”,
“fields”:[{“name”:“SPACEID”,“type”:[“null”,“int”],“default”:null},{“name”:“ARID”,“type”:[“null”,“long”],
“default”:null},{“name”:“ARTICLEID”,“type”:[“null”,“int”],“default”:null}],
“connect.name”:“io.confluent.ksql.avro_schemas.TableaTEditorrevokedoev1Key”},
writer:{“type”:“record”,“name”:“TableaTEditorsentoev1Key”,“namespace”:“io.confluent.ksql.avro_schemas”,
“fields”:[{“name”:“SPACEID”,“type”:[“null”,“int”],“default”:null},{“name”:“ArID”,“type”:[“null”,“long”],“default”:null},
{“name”:“ARTICLEID”,“type”:[“null”,“int”],“default”:null}]}}]; error code: 409; error code: 409
why is that 2 schema getting created ?
one schema with “connect-name” and other without name??
this is my query
CREATE TABLE IF NOT EXISTS table_ArticleTimeline_EditorSentOEV1
WITH (KAFKA_TOPIC=‘streaming.ArticleTimeline.InvitationHistoryOEv1’,VALUE_FORMAT=‘AVRO’)
AS
SELECT i.id,i.id->SpaceId AS SpaceId,i.id->ArticleReviewInvitationId AS ArticleReviewInvitationId,
1 AS ArticleReviewInvitationStatusId,
i.rowtime AS Timestamp
FROM table_ArticleTimeline_EditorInvitation_sent i
EMIT CHANGES;
CREATE TABLE IF NOT EXISTS table_ArticleTimeline_EditorRevokedOEV1
WITH (KAFKA_TOPIC=‘streaming.ArticleTimeline.InvitationHistoryOEv1’,VALUE_FORMAT=‘AVRO’)
AS
SELECT r.id,r.id->SpaceId AS SpaceId,r.id->ArticleReviewInvitationId AS ArticleReviewInvitationId,
4 AS ArticleReviewInvitationStatusId,
r.rowtime AS Timestamp
FROM table_ArticleTimeline_EditorInvitation_revoked r
EMIT CHANGES;