I want to write data in hbase sink table, I have Hbase version 2.2.0 which is compatible flink version 1.14.4 I defined the sink hbase table as follows:
sink_ddl = """
CREATE TABLE hTable (
datemin STRING,
family2 ROW<datemax STRING>,
family3 ROW<channel_title STRING, channel_id STRING>,
PRIMARY KEY (datemin) NOT ENFORCED
) WITH (
'connector' = 'hbase-2.2',
'table-name' = 'test',
'zookeeper.quorum' = '127.0.0.1:2181'
)
"""
And I write data into it with:
table_env.execute_sql("""
INSERT INTO hTable
SELECT
datemin,
ROW(datemax),
ROW(channel_title, channel_id)
FROM table_api_table
""")
but I got error
py4j.protocol.Py4JJavaError: An error occurred while calling o1.executeSql.
: org.apache.flink.table.api.ValidationException: Unable to create a sink for writing table 'default_catalog.default_database.hTable'.
Table options are:
'connector'='hbase-2.2'
'table-name'='test'
'zookeeper.quorum'='127.0.0.1:2181'
Caused by: java.lang.NoSuchMethodError: org.apache.flink.table.factories.DynamicTableFactory$Context.getPhysicalRowDataType()Lorg/apache/flink/table/types/DataType;
at org.apache.flink.connector.hbase2.HBase2DynamicTableFactory.createDynamicTableSink(HBase2DynamicTableFactory.java:95)
at org.apache.flink.table.factories.FactoryUtil.createTableSink(FactoryUtil.java:181)
... 28 more
btw: I added connector jar
please any help? what is the cause of this error?
how can I connect flink with hbase