Python UDF environment variables

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Python UDF environment variables

Soren Macbeth
Hello,

It seems that the environment of my Task Manager container is not available to my python process with executing a python api UDF. Is there some way that I can allow it to access them or some configuration I can set to enable this? I'm testing this my printing out `os.environ` in my UDF.

TIA

--
Soren Macbeth
Staff Data Scientist
503.869.6080
--
Reply | Threaded
Open this post in threaded view
|

Re: Python UDF environment variables

Dian Fu
AFAIK, the system environment variables will be passed to the Python process by default. See [1] for more details.


[1] https://github.com/apache/flink/blob/97bfd049951f8d52a2e0aed14265074c4255ead0/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractPythonFunctionOperator.java#L291

2021年3月18日 上午12:38,Soren Macbeth <[hidden email]> 写道:

Hello,

It seems that the environment of my Task Manager container is not available to my python process with executing a python api UDF. Is there some way that I can allow it to access them or some configuration I can set to enable this? I'm testing this my printing out `os.environ` in my UDF.

TIA

--
Soren Macbeth
Staff Data Scientist
503.869.6080
--