HuangXingBo commented on a change in pull request #11878: URL: https://github.com/apache/flink/pull/11878#discussion_r417746331
########## File path: docs/dev/table/python/usage_notes.md ########## @@ -0,0 +1,120 @@ +--- +title: "Usage Notes" +nav-parent_id: python_tableapi +nav-pos: 140 +--- +<!-- +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. +--> + +This page shows solutions to common problems encountered by PyFlink users after getting started. + +* This will be replaced by the TOC +{:toc} +## How to Add Jars +A PyFlink job often depends on some jar packages, such as connector jar packages, java udf jar packages and so on. +So how to make PyFlink refer to these jar packages? + +You can specify the dependencies with the following Python Table APIs or through command line arguments directly when submitting the job。 +{% highlight python %} +table_env.get_config().set_configuration("pipeline.jars", "file:///my/jar/path/connector.jar;file:///my/jar/path/udf.jar") +{% endhighlight %} +For details, you can refer to <a href="{{ site.baseurl }}/dev/table/python/dependency_management.html#usage">dependency management + +## How to Watch UDF Log +There are different solutions for watching UDF log in local mode and cluster mode. +#### Local +you will see all udf log infos in the console directly. +#### Cluster +you can see the udf log infos in the taskmanager log. + +## How to Prepare a Python Virtual Env Used by PyFlink +You can refer to the following script to prepare a Python virtual env zip which can be used in mac os and most Linux distributions Review comment: Good idea.Thanks. ---------------------------------------------------------------- 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: [email protected]
