shuiqiangchen commented on a change in pull request #14367: URL: https://github.com/apache/flink/pull/14367#discussion_r542356650
########## File path: docs/deployment/cli.md ########## @@ -338,4 +338,74 @@ specified in the `config/flink-config.yaml`. For more details on the commands and the available options, please refer to the Resource Provider-specific pages of the documentation. +### Submitting PyFlink Jobs + +Currently, users are able to submit a PyFlink job via the CLI. It does not require to specify the +JAR file path or the entry main class, which is different from the Java job submission. + +<span class="label label-info">Note</span> When submitting Python job via `flink run`, Flink will run the command "python". Please run the following command to confirm that the python executable in current environment points to a supported Python version of 3.5+. +{% highlight bash %} +$ python --version +# the version printed here must be 3.5+ +{% endhighlight %} + +The following commands show different PyFlink job submission use-cases: + +- Run a PyFlink job: +{% highlight bash %} +$ ./bin/flink run --python examples/python/table/batch/word_count.py +{% endhighlight %} + +- Run a PyFlink job with pyFiles: +{% highlight bash %} +$ ./bin/flink run \ + --python examples/python/table/batch/word_count.py \ + --pyFiles file:///user.txt,hdfs:///$namenode_address/username.txt +{% endhighlight %} + +- Run a PyFlink job with a JAR file: Review comment: There might be jobs that will reference Java UDF or external connectors. JAR file specified in `--jarfile` will be uploaded to the cluster. ---------------------------------------------------------------- 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