flink sql读写phoenix所使用到的连接器依赖包:
flink-sql-connector-phoenix-1.14-1.0.jar
使用示例:
create table tab2(
ID STRING,
NAME STRING,
PRIMARY KEY (ID) NOT ENFORCED
)WITH(
'connector' = 'phoenix-jdbc',
'driver'='org.apache.phoenix.jdbc.PhoenixDriver',
'org.apache.flink.connector.phoenix.schema.isNamespaceMappingEnabled'='true',
'org.apache.flink.connector.phoenix.schema.mapSystemTablesToNamespace'='true',
'url' = 'jdbc:phoenix:192.168.71.00:2181/hbase',
'table-name' = 'ODS.TEST1'
)
有问题随时给我私信~