hequn8128 commented on a change in pull request #10017: [FLINK-14019][python] 
add support for managing environment and dependencies of Python UDF in Flink 
Python API
URL: https://github.com/apache/flink/pull/10017#discussion_r341111616
 
 

 ##########
 File path: flink-python/pyflink/table/table_environment.py
 ##########
 @@ -583,6 +585,114 @@ def register_function(self, name, function):
         self._j_tenv.registerFunction(name, 
function._judf(self._is_blink_planner,
                                                            
self.get_config()._j_table_config))
 
+    def add_python_file(self, file_path):
+        """
+        Upload single python file, python package or local directory to 
cluster.
+        These files and directory will append to the PYTHONPATH variable of 
python UDF worker.
+        Please make sure they can be imported directly.
+
+        If python UDFs used in job depend on additional files, this method 
should be called to
+        upload them to cluster.
+
+        :param file_path: The path of python file, python package or local 
directory.
+        :type file_path: str
+        """
+        self._dependency_manager.add_python_file(file_path)
+        
self._dependency_manager.transmit_parameters_to_jvm(self.get_config().get_configuration())
+
+    def set_python_requirements(self, requirements_list_file, 
requirements_cached_dir=None):
 
 Review comment:
   Rename requirements_list_file to requirements_file?

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


With regards,
Apache Git Services

Reply via email to