BritishGeologicalSurvey / etlhelper

ETL Helper is a Python ETL library to simplify data transfer into and out of databases.
https://britishgeologicalsurvey.github.io/etlhelper/
GNU Lesser General Public License v3.0
100 stars 25 forks source link

Update MS SQL server driver and test configuration #175

Open volcan01010 opened 1 year ago

volcan01010 commented 1 year ago

Summary

As an etlhelper developer, I would like to update the MS SQL Server configuration so that the tests will pass.

Description

Since the MS SQL Server connection configuration was first developed, a few things have changed:

All of these changes have resulted in the test suite failing for MS SQL Server. It should be fixed for v1 of etlhelper.

Acceptance criteria

volcan01010 commented 1 year ago

There is more information on self-signed certificates here: https://stackoverflow.com/questions/71587239/operationalerror-when-trying-to-connect-to-sql-server-database-using-pyodbc

volcan01010 commented 1 year ago

These commits, now in v1 are related.

This one adds a trust_server_certificate flag to MSSQL server connections so it can cope with our self-signed test server.

https://github.com/BritishGeologicalSurvey/etlhelper/pull/183/commits/24fc90bfe92acce3babe1a05c6550e819baf8734

We should probably add a flag for encrypt, as that was also changed in SQL server 18 driver.

This one adds a new error message because the default dictionary row factory isn't compatible with pyodbc's named placeholders. https://github.com/BritishGeologicalSurvey/etlhelper/pull/183/commits/868ceda4088d0a4251af9f3d02e2a0f8fc987ebb