在Airflow GUI外部创建连接

编程入门 行业动态 更新时间:2024-10-27 06:35:05
本文介绍了在Airflow GUI外部创建连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在不与Airflow GUI交互的情况下创建S3连接。是否可以通过airflow.cfg或命令行使用?

I would like to create S3 connection without interacting Airflow GUI. Is it possible through airflow.cfg or command line?

我们正在使用AWS角色,并且以下连接参数对我们有用: { aws_account_id: xxxx , role_arn: yyyyy}

We are using AWS role and following connection parameter works for us: {"aws_account_id":"xxxx","role_arn":"yyyyy"}

因此,在GUI上为S3手动创建连接是可行的,现在我们要自动化该过程并将其添加为气流部署过程的一部分。可以解决吗?

So, manually creating connection on GUI for S3 is working, now we want to automate this process and want to add it as part of the Airflow deployment process. Any work around?

推荐答案

您可以使用气流CLI。不幸的是,不支持编辑连接,因此您必须在部署过程中删除和添加,例如:

You can use the airflow CLI. Unfortunately there is no support for editing connections, so you would have to remove and add as part of your deployment process, e.g.:

airflow connections -d --conn_id 'aws_default' airflow connections -a --conn_id 'aws_default' --conn_uri 'aws:' --conn_extra '{"region_name": "eu-west-1"}'

更多推荐

在Airflow GUI外部创建连接

本文发布于:2023-11-24 11:41:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1625053.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Airflow   GUI

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!