Schema Registry formats

You can avoid defining the Avro and JSON schema for Kafka table sources and sinks, when the schema is stored in Cloudera Schema Registry.

Such topics are accessible through automatically generated tables from the read-only registry catalog.

Maven dependency
If you need to define a table outside the registry catalog, the following example can be used:
CREATE TABLE source_table (
   id BIGINT,
   name STRING,
   description STRING
) WITH (
   'connector.type' = 'kafka',
   'connector.version' = 'universal',
   'connector.topic' = 'message',
   'connector.startup-mode' = 'latest-offset',
   '' = '<hostname>:<port>',
   '' = 'test',
   'format.type' = 'registry',
   '' = 'http(s)://<hostname>:<port>/api/v1'

Cloudera Schema Registry connector for Flink stores the schema version info in the Kafka messages by default. This means that the property is set to false by default.

The schema name in the registry is usually the same as the Kafka topic name, but can be overridden by the format.registry.schema-name property.