Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
188 views
in Technique[技术] by (71.8m points)

python - How can I add new "Conn Types" to Airflow 2.0?

I'm learning Apache Airflow 2.0 and I was creating a new "Connection" but in "Conn Type" there are just a few options, for example I want to add a MySQL connection but there isn't that option. In this post (Apache Airflow - Connection issue to MS SQL Server using pymssql + SQLAlchemy) you can see they have a lot of conn types and I want to know how to create or add new types, right now I need MySQL type but it is probable I need more in the future (like AWS, GCP, etc). I had to create a connection from the CLI but if I edit it from the UI, the conn type is lost so it's a problem...

So they have all those options in conn type: enter image description here

And I have just these options: enter image description here

question from:https://stackoverflow.com/questions/65890511/how-can-i-add-new-conn-types-to-airflow-2-0

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You need to use MySQL Provider to do that either via:

pip install -U 'apache-airflow[mysql]'

or

pip install -U apache-airflow-providers-mysql

http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow-providers/index.html#extending-airflow-connections-and-extra-links-via-providers

From Airflow 2.0.0, the connection type would only be show for the Providers that are already installed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...