Muideen A. Lawal created FLINK-15477:
----------------------------------------
Summary: Create BatchTableEnvironment failed.
Key: FLINK-15477
URL:
https://issues.apache.org/jira/browse/FLINK-15477 Project: Flink
Issue Type: Bug
Components: API / Scala, Table SQL / API
Affects Versions: 1.9.1
Environment: * IntelliJ 2019.3 CE
* Scala 2.12.1
* Flink 1.9.1
Reporter: Muideen A. Lawal
Hi everyone,
I have been trying to use Table API but can't make it work for some reason I do not understand.
I have added the dependencies as specified here ([#
https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/table/]) and import the following in my Scala code;
{code:java}
import org.apache.flink.api.scala._
import org.apache.flink.table.api._
import org.apache.flink.table.api.scala._
{code}
I keep getting error at the point of creating table environment.
{code:java}
val env = ExecutionEnvironment.getExecutionEnvironment
val tblEnv = BatchTableEnvironment.create(env){code}
See below the error message I get below;
{code:java}
Exception in thread "main" org.apache.flink.table.api.TableException: Create BatchTableEnvironment failed. at org.apache.flink.table.api.scala.BatchTableEnvironment$.create(BatchTableEnvironment.scala:308) at org.apache.flink.table.api.scala.BatchTableEnvironment$.create(BatchTableEnvironment.scala:269) at fr.inria.tyrex.flinkpro.debug.Oper2Flink$.main(Oper2Flink.scala:32) at fr.inria.tyrex.flinkpro.debug.Oper2Flink.main(Oper2Flink.scala)Caused by: java.lang.ClassNotFoundException: org.apache.flink.table.api.scala.internal.BatchTableEnvironmentImpl at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at org.apache.flink.table.api.scala.BatchTableEnvironment$.create(BatchTableEnvironment.scala:292) ... 3 more
{code}
Also, what I'm trying to achieve is to rename a column. What I have done so far is converting from DS to Table API, rename the column and convert back to DS. Is this the best way to do it?
Any help on this will be appreciated.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)