Hello, if I want to set an environment variable be...
# questions
r
Hello, if I want to set an environment variable before running a pipeline or importing any node libraries, what would be the best way to do that? I've tried setting via
os.environ
before the import statements in my node scripts, to no avail. Edit: I resolved this by putting the
os.environ["VAR"] = "value"
call at the top of my
settings.py
file. I don't know if this is the best solution, but since this is a workaround until a bugfix occurs in one of the project dependencies I'm happy to leave it there.
n
Can you elaborate a bit what’s the bug here? Doing it in settings is fine or using hook. Can you use parameter instead of environment variable? What sort of parameters that you need to set at runtime?
r
Here's a reference for the bug I'm trying to work around: https://stackoverflow.com/a/75648602/11199683