Search code examples
apache-flinkflink-sql

Using BlinkPlanner in Flink


I was reading the documentation about how to use the "BlinkPlanner" and I found that it is possible to create an instance of TableEnvironmentImpl using the code above:

import org.apache.flink.table.api.{EnvironmentSettings, TableEnvironment}

val bbSettings = EnvironmentSettings.newInstance().useBlinkPlanner().inBatchMode().build()
val bbTableEnv = TableEnvironment.create(bbSettings)

Would it be possible to create an instance of BatchTableEnviromentImpl which uses "BlinkPlanner" as well? I prefer to use BatchTableEnviroment because it exposes more methods than the standard implementation, like for example toDataSet.


Solution

  • No it is not possible to use BlinkPlanner with BatchTableEnvironment.

    Blink planner works only with the DataStream api both for batch and streaming. Actually the plan is to deprecate the DataSet entirely. There are plans to have an equivalent of BatchTableEnvironment that will have methods like e.g. toBoundedStream. The earliest possible release when we could add it is 1.11 though.