feat: Handle database disconnects in SQL taps and targets #2257
Labels
Accepting Pull Requests
good first issue
Good for newcomers
kind/Feature
New feature or request
valuestream/SDK
Feature scope
Taps (catalog, state, stream maps, tests, etc.)
Description
According to the SQLAlchemy docs1, we can call
sa.create_engine(..., pool_pre_ping=True)
.This would be need to be handled in the
SQLConnector.create_engine
:sdk/singer_sdk/connectors/sql.py
Lines 327 to 332 in 08aef2f
The docs say there's a little overhead but otherwise the change seems safe.
Related:
Footnotes
https://docs.sqlalchemy.org/en/20/core/pooling.html#pool-disconnects-pessimistic ↩
The text was updated successfully, but these errors were encountered: