Exception in thread “main“ org.apache.flink.table.api.NoMatchingTableFactoryException

今天在做Flink Tab Api中从kafka读取数据源时运行报错,Exception in thread "main" org.apache.flink.table.api.NoMatchingTableFactoryException: Could not find a suitable table factory for 'org.apache.flink.table.factories.DeserializationSchemaFactory' in the classpath

经查阅资料得知,本地的数据还依然可以用oldScv格式描述器,但是对于kafka来讲由于oldScv格式描述器它是非标的,跟外部系统对接并不通用,所以将被弃用,目前新的描述器就叫 Csv(),但flink 没有直接提供,需要手动引入依赖 flink-csv:

<dependency>
 <groupId>org.apache.flink</groupId>
 <artifactId>flink-csv</artifactId>
 <version>1.10.0</version>
</dependency>

maven中的version可以根据自己flink版本来设置,引入依赖后一切正常

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_44080445/article/details/113250903