[
https://issues.apache.org/jira/browse/AIRFLOW-4853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16873189#comment-16873189
]
Ash Berlin-Taylor commented on AIRFLOW-4853:
--------------------------------------------
{code:python}
with create_session() as session:
conn.schema = "a"
conn.set_password("b")
session.add(conn)
# session.commit() may be needed - I can't remember if we commit
automatically from the with block
{code}
With set_password you'd still have to handle the session managment like this --
all set_password does is encrypt the value and keep it in memory. Without the
session management it would still not be updated.
> Add get_schema and set_schema in Connection module
> --------------------------------------------------
>
> Key: AIRFLOW-4853
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4853
> Project: Apache Airflow
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.10.3
> Reporter: jack
> Priority: Major
>
> The module has set_password, set_extra methods.
> It wouod be nice also to have set_schema to have the ability to change it
> after Connection was created.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)