【Flink】SQL-CLIENT中出现 Could not find any factory for identifier ‘kafka‘
在Flink的sql-client客户端中执行sql代码时出现如下错误,版本Flink1.13.6
[ERROR] Could not execute SQL statement. Reason:
org.apache.flink.table.api.ValidationException: Could not find any factory for identifier 'kafka' that implements 'org.apache.flink.table.factories.DynamicTableFactory' in the classpath.
执行的代码如下
CREATE TABLE kafka_source (
id INTEGER,
name STRING,
create_time TIMESTAMP(3)
) WITH (
'connector' = 'kafka',
'topic' = 'mysqlsource',
'properties.bootstrap.servers' = '192.168.1.1:9092',
'properties.group.id' = 'mygroupid',
'scan.startup.mode' = 'latest-offset',
'format' = 'json'
);
select * from kafka_source
问题原因:Flink解压后的lib目录中并没有kafka相关依赖导致ÿ