Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BuzzCutNorman opened this issue Jan 10, 2023 · 1 comment · May be fixed by #20
Open

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

BuzzCutNorman opened this issue Jan 10, 2023 · 1 comment · May be fixed by #20

Comments

@BuzzCutNorman
Copy link
Owner

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

  • Add support for supplying conn_properties to pymssql in order to override the built-in session properties supplied by pymssql by default,

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
Copy link
Contributor

More details upstream in pymssql pymssql/pymssql#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"

@BuzzCutNorman BuzzCutNorman linked a pull request Jan 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants