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

Hand over odbc_kwargs["encrypt"]="yes" as -Ym and "no" as -Yo over to bcp command line tool #130

Open
windiana42 opened this issue Jun 27, 2023 · 2 comments

Comments

@windiana42
Copy link
Contributor

Spinning up a SQL Server database as Linux running container is a nice way to test code meant for SQL Server databases. However, to use bcpandas with such a database, we need to pass ?Encrypt=no to the sqlalchemy connect string. This can be handed over to bcpandas.sqlCreds as odbc_kwargs["Encrypt"]="no". When running bcp executable this needs to be translated to adding argument -Yo.

@windiana42
Copy link
Contributor Author

Sorry for submitting three issues in a row. I can prepare a pull-request about how the issues could be fixed. The three issues are related in that they cause trouble when testing with Linux version of SQL Server in a container.

@windiana42
Copy link
Contributor Author

I see that you also use linux based docker container for testing. I am not an expert here, but I see several setups that use Encrypt option bcp -Y which I would like to support with another open source tool (https://github.com/pydiverse/pydiverse.pipedag) that should offer fast transfer to/from SQL Server databases. I would love to use bcpandas, there.

windiana42 added a commit to windiana42/bcpandas that referenced this issue Jun 28, 2023
windiana42 added a commit to windiana42/bcpandas that referenced this issue Jun 28, 2023
windiana42 added a commit to windiana42/bcpandas that referenced this issue Jun 28, 2023
…kwargs

fixes yehoshuadimarsky#130
stores sql_creds.driver_version to simplify copy construction of SqlCreds

Disclaimer:
I currently don't have a test environment that can execute tests with
`@pytest.mark.usefixtures("database")` and tested with user repository
instead of unit tests
windiana42 added a commit to windiana42/bcpandas that referenced this issue Jul 3, 2023
…kwargs

fixes yehoshuadimarsky#130
stores sql_creds.driver_version to simplify copy construction of SqlCreds

Disclaimer:
I currently don't have a test environment that can execute tests with
`@pytest.mark.usefixtures("database")` and tested with user repository
instead of unit tests
windiana42 added a commit to windiana42/bcpandas that referenced this issue Jul 3, 2023
…kwargs

fixes yehoshuadimarsky#130
stores sql_creds.driver_version to simplify copy construction of SqlCreds

Disclaimer:
I currently don't have a test environment that can execute tests with
`@pytest.mark.usefixtures("database")` and tested with user repository
instead of unit tests
windiana42 added a commit to windiana42/bcpandas that referenced this issue Jul 3, 2023
…kwargs

fixes yehoshuadimarsky#130
stores sql_creds.driver_version to simplify copy construction of SqlCreds

Disclaimer:
I currently don't have a test environment that can execute tests with
`@pytest.mark.usefixtures("database")` and tested with user repository
instead of unit tests
windiana42 added a commit to windiana42/bcpandas that referenced this issue Jul 3, 2023
…kwargs

fixes yehoshuadimarsky#130
stores sql_creds.driver_version to simplify copy construction of SqlCreds

Disclaimer:
I currently don't have a test environment that can execute tests with
`@pytest.mark.usefixtures("database")` and tested with user repository
instead of unit tests
borchero pushed a commit that referenced this issue Jul 12, 2023
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

No branches or pull requests

1 participant