john-bodley commented on issue #8574: URL: https://github.com/apache/superset/issues/8574#issuecomment-1749723230
So it seems like this functionality may already have been partially implemented, sans the configuration within the UI. Specially the [`_get_sqla_engine`](https://github.com/apache/superset/blob/0c40bea0643ec2b0cc725ec646c9fa97319d9565/superset/models/core.py#L423-L508) method has the ability to either use a `NullPool` (default) or to fallback to the SQLAlchemy default, where [if not set](https://github.com/sqlalchemy/sqlalchemy/blob/6d6e3df8ce0d455eac00ddc8d9618897ae799fe4/lib/sqlalchemy/engine/create.py#L642-L643) reverts to using the [dialect specific](https://github.com/sqlalchemy/sqlalchemy/blob/f81c1c213f7d7f7df1fc5c57342e94e6738103db/lib/sqlalchemy/engine/default.py#L484-L489) configuration (or `QueuePool` if not defined). If the connection pool settings need to differ from the metadata database then one can leverage SQLAlchemy binds via Flask-SQLAlchemy's [`SQLALCHEMY_BINDS`](https://flask-sqlalchemy.palletsprojects.com/en/3.1.x/binds/) configuration. The one missing step is exposing the ability to choose between using the `NullPool` pool-class or the dialect pool-class when invoking the `get_sqla_engine` method. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
