Airflow在尝试运行DAG时返回错误,提示它找不到环境变量,这很奇怪,因为它能够找到我存储为Python变量的其他3个环境变量。那些变量根本没有问题。
Airflow is returning an error when trying to run a DAG saying that it can't find an environment variable, which is odd because it's able to find 3 other environment variables that I'm storing as a Python variable. No issues with those variables at all.
我在〜/ .profile 中拥有所有4个变量,并且也完成了
I have all 4 variables in ~/.profile and have also done
export var1="varirable1" export var2="varirable2" export var3="varirable3" export var4="varirable4"在用户做什么下气流运行?我也已经完成了 sudo 下的 export 命令,因此我认为它们会被 airflow 运行dag
Under what user does airflow run? I've done those export commands under sudo as well, so I thought they would be picked up by airflow when it runs the dag
推荐答案可能是因为airflow使用了非登录功能贝壳?您是否尝试过将这些行放在〜/ .bashrc而不是〜/ .profile中?
Is it maybe because airflow uses non-login shell? Have you tried putting these lines in : ~/.bashrc instead of ~/.profile ?
更多推荐
如何设置环境变量以使用气流?
发布评论