BuzzCutNorman / tap-mssql

Singer Tap for MS SQL built with Meltano Singer SDK.
MIT License
2 stars 9 forks source link

feat: Add support to pass `connect_args` placed in `meltano.yml` to pymssql #15

Open BuzzCutNorman opened 1 year ago

BuzzCutNorman commented 1 year ago

This would come in handy. Here is an example form @cwegener

Code Example given:

    def create_sqlalchemy_engine(self) -> sqlalchemy.engine.Engine:
        """Return a new SQLAlchemy engine using the provided config.

        Returns:
            A newly created SQLAlchemy engine object.
        """

        connect_args = {}
        if self.config.get("conn_properties") is not None:
            connect_args = {"conn_properties": self.config.get("conn_properties")}

        return sqlalchemy.create_engine(self.sqlalchemy_url, echo=False, connect_args = connect_args)
cwegener commented 1 year ago

More details upstream in pymssql https://github.com/pymssql/pymssql/issues/793

It seems to me that ultimately the Microsoft end-user must know exactly how to choose the correct set of connection properties in order to talk to the more exotic flavours of "SQL Server"