tanjialiang created FLINK-33164: ----------------------------------- Summary: HBase connector support ignore null value for partial update Key: FLINK-33164 URL: https://issues.apache.org/jira/browse/FLINK-33164 Project: Flink Issue Type: Improvement Components: Connectors / HBase Affects Versions: hbase-3.0.0 Reporter: tanjialiang
Sometimes, user want to write data and ignore null value to achieve partial update. So i suggest adding an options: sink.ignore-null-value. {code:java} CREATE TABLE hTable ( rowkey STRING, cf1 ROW<q1 STRING, q2 STRING>, PRIMARY KEY (rowkey) NOT ENFORCED ) WITH ( 'connector' = 'hbase-2.2', 'table-name' = 'default:test', 'zookeeper.quorum' = 'localhost:2181', 'sink.ignore-null-value' = 'true' -- default is false, true is enabled ); INSERT INTO hTable VALUES('1', ROW('10', 'hello, world')); INSERT INTO hTable VALUES('1', ROW('30', CAST(NULL AS STRING))); -- null value to cf1.q2 -- when sink.ignore-null-value is false // after first insert {rowkey: "1", "cf1": {q1: "10", q2: "hello, world"}} // after second insert, cf1.q2 update to null {rowkey: "1", "cf1": {q1: "30", q2: "null"}} -- when sink.ignore-null-value is true // after first insert {rowkey: "1", "cf1": {q1: "10", q2: "hello, world"}} // after second insert, cf1.q2 is still the old value {rowkey: "1", "cf1": {q1: "30", q2: "hello, world"}} {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)