Hi there,
I’m trying to set up Great Expectations so that it stores Expectation definitions and validation results in a Microsoft SQL database.
I can set up MS SQL as a datasource - that works great.
I’ve tried setting up PostgreSQL as a Expectations Store and Validations Store and that works too.
These are the stores in my great_expectations.yml:
stores:
expectations_db_store:
class_name: ExpectationsStore
store_backend:
class_name: DatabaseStoreBackend
credentials: ${mssql}
validations_db_store:
class_name: ValidationsStore
store_backend:
class_name: DatabaseStoreBackend
credentials: ${mssql}
expectations_store_name: expectations_db_store
validations_store_name: validations_db_store
This is my config_variables.yml:
mssql:
url: mssql+pyodbc://XXX:XXX@XXX.database.windows.net:1433/XXX?driver=ODBC
Driver 17 for SQL Server&charset=utf&autocommit=true
When I try to do just great_expectations store list
it complains that there is no drivername. When I add drivername: mssql+pyodbc
, it says __init__() got an unexpected keyword argument 'url'
.
It seems to me that MS SQL credentials can’t be configured using the drivername/host/… format and can only be configured through url
. However it looks like the DatabaseStoreBackend
only supports the drivername/host/… format.
Is this the case or am I doing something wrong? I see you’re using SQL alchemy for both datasources and stores, so it sounds like it should work somehow.
Thanks,
Petr