You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jing Ge (Jira)" <ji...@apache.org> on 2024/03/05 22:47:00 UTC
[jira] [Updated] (FLINK-34509) Docs: Fix Debezium JSON/AVRO opts in examples
[ https://issues.apache.org/jira/browse/FLINK-34509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jing Ge updated FLINK-34509:
----------------------------
Fix Version/s: 1.20.0
> Docs: Fix Debezium JSON/AVRO opts in examples
> ----------------------------------------------
>
> Key: FLINK-34509
> URL: https://issues.apache.org/jira/browse/FLINK-34509
> Project: Flink
> Issue Type: Improvement
> Components: Documentation
> Affects Versions: 1.19.0, 1.20.0
> Reporter: Lorenzo Affetti
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.20.0
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Problem found here: [https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/table/formats/debezium/#how-to-use-debezium-format.]
> Here is the example provided:
> {code:java}
> CREATE TABLE topic_products (
> -- schema is totally the same to the MySQL "products" table
> id BIGINT,
> name STRING,
> description STRING,
> weight DECIMAL(10, 2)
> ) WITH (
> 'connector' = 'kafka',
> 'topic' = 'products_binlog',
> 'properties.bootstrap.servers' = 'localhost:9092',
> 'properties.group.id' = 'testGroup',
> -- using 'debezium-json' as the format to interpret Debezium JSON messages
> -- please use 'debezium-avro-confluent' if Debezium encodes messages in Avro format
> 'format' = 'debezium-json'
> ) {code}
> Actually, `debezium-json` would require `'debezium-json.schema-include' = 'true'` to work (as, by default, Debezium includes the schema. See [https://www.markhneedham.com/blog/2023/01/24/flink-sql-could-not-execute-sql-statement-corrupt-debezium-message/).]
> On the other hand `debezium-avro` would require the URL of the Confluent schema registry: `'debezium-avro-confluent.url' = '[http://...:8081'.]
> I propose to split the single example in 2 with the correct default options.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)