[ https://issues.apache.org/jira/browse/FLINK-33164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martijn Visser closed FLINK-33164. ---------------------------------- Fix Version/s: hbase-3.0.1 Resolution: Fixed Fixed in apache/flink-connector-hbase main: 298d8164495732f59d18c54d4d40b601b6d44f21 v3.0: 654469780f0ac85f156525575c8b522227559f03 > 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 > Assignee: tanjialiang > Priority: Major > Labels: pull-request-available > Fix For: hbase-3.0.1 > > > 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)