from airflow import settingsfrom airflow.models import Connectionconn = Connection( conn_id=conn_id, conn_type=conn_type, host=host, login=login, password=password, port=port) #create a connection objectsession = settings.Session() # get the sessionsession.add(conn)session.commit() # it will insert the connection object programmatically.
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)