For using absolute paths answer from https://lists.apache.org/list.html?user@flink.apache.org:
full answer here
for abstract structure the directory:
flink_app/
data_service/
filesystem.py
validator/
validator.py
common/
constants.py
main.py <- entry job
When submitting the PyFlink job you can specify python files and entry main module with option --pyFiles and --pyModule1, like:
$ ./bin/flink run --pyModule flink_app.main --pyFiles ${WORKSPACE}/flink_app
In this way, all files under the directory will be added to the PYTHONPAHT of both the local client and the remote python UDF worker.