sunjincheng121 commented on a change in pull request #8675: [FLINK-12716][python] Add an interactive shell for Python Table API URL: https://github.com/apache/flink/pull/8675#discussion_r293642713
########## File path: docs/ops/python_shell.zh.md ########## @@ -0,0 +1,179 @@ +--- +title: "Python REPL" +nav-parent_id: ops +nav-pos: 7 +--- +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +Flink附带了一个集成的交互式Python Shell。 +它既能够运行在本地启动的local模式,也能够运行在集群启动的cluster模式下。 + +为了使用Flink的Python Shell,你只需要在Flink的binary目录下执行: + +{% highlight bash %} +bin/pyflink-shell.sh local +{% endhighlight %} + +关于如何在一个Cluster集群上运行Python shell,可以参考下面的启动那一节的内容 + +## 使用 + +当前Python shell支持Table API的功能。 +在启动之后,Table Environment的相关内容将会被自动加载。 +可以通过变量"bt_env"来使用BatchTableEnvironment,通过变量"st_env"来使用StreamTableEnvironment。 + +### Table API + +下面的内容是关于如何通过Python Table API来实现一个简单的作业: Review comment: 下面是一个通过Python Shell 运行的简单示例。 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services