You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Zhiwen Sun (Jira)" <ji...@apache.org> on 2022/05/25 03:54:00 UTC

[jira] [Created] (FLINK-27761) Add database and table field in canal-json sink

Zhiwen Sun created FLINK-27761:
----------------------------------

             Summary: Add database and table field in canal-json sink
                 Key: FLINK-27761
                 URL: https://issues.apache.org/jira/browse/FLINK-27761
             Project: Flink
          Issue Type: Improvement
          Components: Formats (JSON, Avro, Parquet, ORC, SequenceFile), Table SQL / Ecosystem
            Reporter: Zhiwen Sun


When sink with canal-json format, only two fields in json root : {{data}} and {{{}type{}}}.

for example :
{code:java}
{"data":[{"order_status":"OK","order_amount":120,"dt":"2022-05-25"}],"type":"INSERT"}{code}
If we want to output the data of multiple tables to the same topic, this will become inconvenient.

If the output contains database and table , we can continue to use the {{canal-json.database.include }}and {{canal-json.table.include}} to distinguish.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)