You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dawid Wysakowicz (JIRA)" <ji...@apache.org> on 2019/07/29 11:46:00 UTC

[jira] [Commented] (FLINK-13468) No create method in StreamTableEnvironment

    [ https://issues.apache.org/jira/browse/FLINK-13468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16895167#comment-16895167 ] 

Dawid Wysakowicz commented on FLINK-13468:
------------------------------------------

Make sure you are using the same language versions of the API for both {{StreamExecutionEnvironment}} and {{StreamTableEnvironment}}. There should be method {{StreamTableEnvironment.create(StreamExecutionEnvironment)}}.

For scala you should use:
{code}
org.apache.flink.table.api.scala.StreamTableEnvironment
org.apache.flink.streaming.api.scala.StreamExecutionEnvironment
{code}
For java:
{code}
org.apache.flink.table.api.java.StreamTableEnvironment
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment
{code}

> No create method in StreamTableEnvironment
> ------------------------------------------
>
>                 Key: FLINK-13468
>                 URL: https://issues.apache.org/jira/browse/FLINK-13468
>             Project: Flink
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 1.8.1
>            Reporter: Mateusz Jarzyna
>            Priority: Major
>
> I'm trying to use table api. 
> Dependencies:
> {code:java}
> <properties>
>     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>     <flink.version>1.8.1</flink.version>
>     <java.version>1.8</java.version>
>     <scala.binary.version>2.11</scala.binary.version>
>     <maven.compiler.source>${java.version}</maven.compiler.source>
>     <maven.compiler.target>${java.version}</maven.compiler.target>
> </properties>
> <dependencies>
>     <!-- Apache Flink dependencies -->
>     <!-- These dependencies are provided, because they should not be packaged into the JAR file. -->
>     <dependency>
>         <groupId>org.apache.flink</groupId>
>         <artifactId>flink-java</artifactId>
>         <version>${flink.version}</version>
>         <scope>provided</scope>
>     </dependency>
>     <dependency>
>         <groupId>org.apache.flink</groupId>
>         <artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
>         <version>${flink.version}</version>
>         <scope>provided</scope>
>     </dependency>
>     <dependency>
>         <groupId>org.apache.flink</groupId>
>         <artifactId>flink-connector-kafka_${scala.binary.version}</artifactId>
>         <version>${flink.version}</version>
>     </dependency>
>     <dependency>
>         <groupId>org.apache.flink</groupId>
>         <artifactId>flink-table-planner_${scala.binary.version}</artifactId>
>         <version>${flink.version}</version>
>     </dependency>
>     <dependency>
>         <groupId>org.apache.flink</groupId>
>         <artifactId>flink-table-api-java-bridge_${scala.binary.version}</artifactId>
>         <version>${flink.version}</version>
>     </dependency>
> </dependencies>
> {code}
>  Documentation say that I have to use:
> {code:java}
> StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
> StreamTableEnvironment tableEnv = StreamTableEnvironment.create(env);
> {code}
> But .create{color:#986801}(env){color}; method does not exist. I've tried with .{color:#c18401}getTableEnvironment{color}{color:#986801}(env){color}; but it is deprecated :(
> How can I use the table api?
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)