[jira] [Created] (FLINK-20907) Table API documentation promotes deprecated syntax

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-20907) Table API documentation promotes deprecated syntax

Shang Yuanchun (Jira)
Svend Vanderveken created FLINK-20907:
-----------------------------------------

             Summary: Table API documentation promotes deprecated syntax
                 Key: FLINK-20907
                 URL: https://issues.apache.org/jira/browse/FLINK-20907
             Project: Flink
          Issue Type: Improvement
          Components: Documentation
    Affects Versions: 1.12.0
            Reporter: Svend Vanderveken


Code examples in java, scala and python showing the overall structure of a Flink Table API job are all using the `tableEnv.connect(...)` syntax, which is deprecated.

As visible here:

[https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/table/common.html#structure-of-table-api-and-sql-programs]

For example:
{code:java}
// create a TableEnvironment for specific planner batch or streaming
TableEnvironment tableEnv = ...; // see "Create a TableEnvironment" section

// create a Table
tableEnv.connect(...).createTemporaryTable("table1");
// register an output Table
tableEnv.connect(...).createTemporaryTable("outputTable");

// create a Table object from a Table API query
Table tapiResult = tableEnv.from("table1").select(...);
{code}
This is quite missleading since this is one of the first place where Table API code is shown to the reader.

I suggest I send a small PR to show the {{executeSql()}} syntax, which is now preferred.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)