Read HBase data
This article provides implementation ideas, configuration examples, and verification methods for HBase data reading scenarios, which can be used as a reference for actual project configuration.
Case
Print the data of HBase2.1.0 version
solution
Create a Flink SQL job type and add the following dependencies Download the dependency package for the corresponding version of HBase
- flink-connector-HBase-2.2-4.0.0-1.18.jar download
- flink-connector-HBase-base-4.0.0-1.18.jar download
- HBase-client-2.1.0.jar download
- HBase-common-2.1.0.jar download
- HBase-protocol-2.1.0.jar download
- HBase-protocol-shaded-2.1.0.jar download
- HBase-shaded-miscellaneous-2.1.0.jar download
- HBase-shaded-netty-2.1.0.jar download
- HBase-shaded-protobuf-2.1.0.jar download

The sample sql is as follows:
CREATE TABLE hTable (
rowkey string,
cf1 ROW<username STRING, age STRING>
) WITH (
'connector' = 'hbase-2.2',
'table-name' = 'ispong_namespace:users',
'zookeeper.quorum' = '127.0.0.1:2181'
);
CREATE TABLE print_sink (
rowid string,
username string,
age string
) WITH (
'connector' = 'print'
);
INSERT INTO print_sink (rowid,username,age)
SELECT rowkey,cf1.username,cf1.age FROM hTable;
