以下代码片段摘自此博客文章:
val sensorTable = ??? // can be a CSV file, Kafka topic, database, or ...
// register the table source
tEnv.registerTableSource("sensors", sensorTable)
我想从关系数据库中读取数据。Flink 有TableSourceJDBC 数据库吗?
以下代码片段摘自此博客文章:
val sensorTable = ??? // can be a CSV file, Kafka topic, database, or ...
// register the table source
tEnv.registerTableSource("sensors", sensorTable)
我想从关系数据库中读取数据。Flink 有TableSourceJDBC 数据库吗?
在其当前版本(1.4.0,2017 年 12 月)中,Flink 不提供用于TableSource从关系数据库中摄取数据的内置功能。
但是,有一个JDBCInputFormat可以使用的。你可以
DataSet为TableJdbcTableSource包装JdbcInputFormat. a 的简单实现JdbcTableSource应该很容易实现。实现对并行读取、投影或过滤器下推的支持需要更多的努力。