alan-turing-institute / sqlsynthgen

Synthetic data for SQL databases
MIT License
11 stars 1 forks source link

Add SQL Server Functional Tests #151

Open Iain-S opened 1 year ago

Iain-S commented 1 year ago

I have manually verified that SSG works with SQL Server but only for a simple case, locally on MacOS. It would be better to automate this as a form of documentation and to guard against regressions.

Proposal

We could set up a simple SQL Server service in a GH workflow using this image and use sqlcmd to set up a src database in much the same way as we use psql and the src.dump file.

The command would be something like:

sqlcmd -S 127.0.0.1 -C -U sa -P somepassword < sql_server.sql

where sql_server.sql could be:

create table tableone (
    idcol int primary key,
    othercol varchar(255)
);
go

We may also want to change the pytest marks so that we have Postgres and SQLServer (and MariaDB?) env vars rather than the single REQUIRES_DB setting.

Steps