写一段Scala版的flink连接clickhouse
时间: 2023-03-07 22:10:21 浏览: 154
flink-connector-jdbc_2.12-1.14.5.jar 重新编译 支持连接clickhouse
5星 · 资源好评率100%
val clickhouseEnv = new Map[String, String]()
clickhouseEnv.put("clickhouse.url", "jdbc:clickhouse://localhost:9000/default")
val clickhouseSource = new ClickhouseSource(clickhouseEnv)
val clickhouseSink = new ClickhouseSink(clickhouseEnv)val clickhouseDataStream = env
.addSource(clickhouseSource)
.map(data => processData(data))
.addSink(clickhouseSink)
阅读全文