Open avneeshn opened 10 months ago
Hi @avneeshn , thank you for reaching out with this feature request. Would setting autocommit
on the module level work for your use case? Setting autocommit=True
on the module level would enable autocommit for subsequent connections. For example
import redshift_connector
redshift_connector.autocommit = True
redshift_connector.connect({ # autocommit is set to True, as specified on the redshift_connector module
**connection_params
})
redshift_connector.connect({ # again, autocommit is set to True, as specified on the redshift_connector module
**connection_params
})
That would not work for our case. We are creating and maintaining multiple connections so we need a connection-level autocommit
property
Currently, to set
autocommit
toTrue
, we have to explicitly run:Is there a way to pass
autocommit
as a property to the connector constructor? Something like:We are trying to build an SQL client for our customers with Redshift as one of the underlying data-sources. It would be much cleaner this way avoiding unnecessary if-else conditioning.