HuangXingBo commented on a change in pull request #8916: 
[FLINK-12897][python][docs] Improve the Python Table API docs by adding more 
examples
URL: https://github.com/apache/flink/pull/8916#discussion_r298435312
 
 

 ##########
 File path: docs/dev/table/common.zh.md
 ##########
 @@ -392,6 +486,26 @@ val revenue = orders
 
 **Note:** The Scala Table API uses Scala Symbols, which start with a single 
tick (`'`) to reference the attributes of a `Table`. The Table API uses Scala 
implicits. Make sure to import `org.apache.flink.api.scala._` and 
`org.apache.flink.table.api.scala._` in order to use Scala implicit conversions.
 </div>
+
+<div data-lang="python" markdown="1">
+{% highlight python %}
+# get a StreamTableEnvironment, works for BatchTableEnvironment equivalently
+table_env = StreamTableEnvironment.create(env)
+
+# register Orders table
+
+# scan registered Orders table
+orders = table_env.scan("Orders")
+# compute revenue for all customers from France
+revenue = orders \
+    .filter("cCountry === 'FRANCE'")
 
 Review comment:
   Whether add \ after the method filter and groupby ?

----------------------------------------------------------------
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

Reply via email to