Unfortunately, I am using Superset which uses SQLALCHEMY for metadata DB connection. So I am not sure if I could have control over the code or not. Is there any other way I could do this?
On Thursday, 4 April 2019 15:24:42 UTC-4, Mike Bayer wrote: > > the issue describing how this feature can be added is at: > > https://github.com/sqlalchemy/sqlalchemy/issues/4392 > > for now you need to use creator to connect to psycopg2 directly and > return the connection yourself from a function, which you pass to > create_engine: > > https://docs.sqlalchemy.org/en/latest/core/engines.html#custom-dbapi-connect-arguments > > and the URL format is at > > https://www.postgresql.org/docs/current/libpq-connect.html#libpq-multiple-hosts > > . > > > On Thu, Apr 4, 2019 at 2:42 PM rishi reddy <[email protected] > <javascript:>> wrote: > > > > Hi All, > > > > I have Postgres DB two node cluster and using SQLALCHEMY_DATABASE_URI > were we can give only one node details. But how can i achieve a scenario > were if the given node goes down SQLALCHEMY will connect to the other > backup node. Is there an option of giving the backup node details in > SQLALCHEMY_DATABASE_URI? > > > > Thanks in advance. > > -Rishi > > > > -- > > SQLAlchemy - > > The Python SQL Toolkit and Object Relational Mapper > > > > http://www.sqlalchemy.org/ > > > > To post example code, please provide an MCVE: Minimal, Complete, and > Verifiable Example. See http://stackoverflow.com/help/mcve for a full > description. > > --- > > You received this message because you are subscribed to the Google > Groups "sqlalchemy" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > Visit this group at https://groups.google.com/group/sqlalchemy. > > For more options, visit https://groups.google.com/d/optout. > -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
