Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
atognola
Contributor
Contributor

Kafka with Schema registry is not honoring primary keys or non NULL fields

Hi there,

I have a Postgres table created as follows:

 

CREATE TABLE public.cdc_test_1 (
	id int4 NOT NULL,
	"name" varchar NOT NULL,
	age int4 NOT NULL,
	surname varchar NULL,
	CONSTRAINT cdc_test_1_pk PRIMARY KEY (id)
);

 

And I've set up Qlik replicate to publish to Kafka and Schema Registry.

However, in schema registry I get:

 

{
  "subject": "public.cdc_test_1-value",
  "version": 2,
  "id": 14,
  "schema": "{\"type\":\"record\",\"name\":\"DataRecord\",\"namespace\":\"public.cdc_test_1_flat\",\"fields\":[{\"name\":\"id\",\"type\":[\"null\",\"int\"],\"default\":null},{\"name\":\"name\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"age\",\"type\":[\"null\",\"int\"],\"default\":null},{\"name\":\"surname\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"operation\",\"type\":{\"type\":\"enum\",\"name\":\"operation\",\"symbols\":[\"INSERT\",\"UPDATE\",\"DELETE\",\"REFRESH\"]}},{\"name\":\"changeSequence\",\"type\":\"string\"},{\"name\":\"timestamp\",\"type\":\"string\"},{\"name\":\"streamPosition\",\"type\":\"string\"},{\"name\":\"transactionId\",\"type\":\"string\"},{\"name\":\"changeMask\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"columnMask\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"externalSchemaId\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"transactionEventCounter\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"transactionLastEvent\",\"type\":[\"null\",\"boolean\"],\"default\":null},{\"name\":\"schemaName\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"tableName\",\"type\":[\"null\",\"string\"],\"default\":null}]}"
}

 

Labels (1)
1 Reply
john_wang
Support
Support

Hello @atognola ,

Welcome to Qlik Community forum and thanks for reaching out here!

The behavior can be reproduced in latest version of Qlik Replicate, 2024.5.0.563. I'd like to suggest you opening a support ticket, and attach the diagnostic packages. Our support team will be more than happy to assist you.

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!