You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by "wanglei2@geekplus.com" <wa...@geekplus.com> on 2020/08/18 10:57:38 UTC
How to write a customer sink partitioner when using flinksql kafka-connector
CREATE TABLE kafka_sink_table(
warehouse_id INT,
pack_task_order_id BIGINT,
out_order_code STRING,
pick_order_id BIGINT,
end_time BIGINT
WITH (
'connector'='kafka',
'topic'='ods_wms_pack_task_order',
'properties.bootstrap.servers'='172.19.78.32:9092',
'format'='json'
);
INSERT INTO kafka_sink_table SELECT .......
As describe hereļ¼ https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/connectors/kafka.html
I want to do partition according to warehouse_id.
How should i write my customer partitioner? Is there any example?
Thanks,
Lei
wanglei2@geekplus.com