云作曲家(气流)运行依赖的python脚本
Python Project正在运行多个PY脚本。是否可以从DAG中调用其他Python脚本,而是从单个Python脚本中调用DAG中的一个Python脚本,即通过Pythonoperator或气流中的Bashoperator在DAG中提到的部分。
例如,我想使用test.py调用其他Python脚本
curl = BashOperator(
task_id='multiplescripts',
bash_command="test.py",
dag=dag)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
PythOnoperator用于执行Python可叫。如果您要执行Python脚本,而不仅仅是使用适当的bash命令:
因此,操作员将是:
PythonOperator is used to execute a python callable. If you want to execute a python script than just use the the proper bash command:
so the operator would be:
您可以致电pythontoerator。像这样,
您可以看到文档
You can call the PythonOperator. Like that
You can see the documentation