nathadfield commented on pull request #15013:
URL: https://github.com/apache/airflow/pull/15013#issuecomment-810013687


   > > Unfortunately the connection URI format is not capable of expressing
   > > all values of the Connection class. In particular the Connection
   > > class allows for arbitrary string values for the extra parameter,
   > > while the URI format requires that this parameter be unnested JSON
   > > so that it can serialize into query parameters.
   > 
   > That's not true. Or at least I don't _think_ that's true.
   > 
   > We have a convenience method `get_uri` you can use to produce the URI.
   > 
   > Try creating your connection as desired with init params including your 
json `extra`. Then call `get_uri` on the connection.
   > 
   > Use this URI in vault.
   > 
   > If you have a json value for extra that can not be serialized to airflow 
URI please post it here.
   
   @dstandish Even so, might not this be a good feature anyway?
   
   A `conn_uri` is fine but they can be a bit unwieldy and it is not that 
straightforward to create one correctly.  I would personally also like the 
ability to store the individual elements of a connection as a secret in 
Vault/GSM and for Airflow to build the connection at runtime.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to