Skip to main content
Version: Next

Microsoft SQL Server Catalog Connector

Connect to a Microsoft SQL Server database as a catalog provider for federated SQL query. The MSSQL Catalog Connector automatically discovers schemas and tables within a SQL Server database and makes them available for querying in Spice.

For connecting to individual SQL Server tables, see the Microsoft SQL Server Data Connector documentation.

Configuration

catalogs:
- from: mssql
name: my_mssql
include:
- 'dbo.*' # include all tables from the dbo schema
params:
mssql_connection_string: "Server=localhost,1433;Database=my_database;User Id=${secrets:MSSQL_USER};Password=${secrets:MSSQL_PASS};"

from

The from field specifies the catalog provider. For Microsoft SQL Server, use mssql.

name

The name field specifies the name of the catalog in Spice. Tables from the SQL Server database will be available under this catalog name. The schema hierarchy of the SQL Server database is preserved in Spice.

include

Use the include field to specify which tables to include from the catalog. The include field supports glob patterns to match multiple tables. For example, *.my_table_name would include all tables with the name my_table_name from any schema. Multiple include patterns are OR'ed together.

params

Connection can be configured using a connection string or individual parameters.

Connection string

Parameter NameDescription
mssql_connection_stringAn ADO.NET connection string. E.g. Server=host,port;Database=mydb;User Id=sa;Password=pass;.

Individual parameters

Parameter NameDescription
mssql_hostThe SQL Server host address.
mssql_portThe SQL Server port number.
mssql_databaseThe SQL Server database name.
mssql_usernameThe SQL Server username for authentication.
mssql_passwordThe SQL Server password for authentication.
mssql_encryptEncryption mode: true (default), false, require, or disable.
mssql_trust_server_certificateWhether to trust the server certificate: true or false.

Authentication

Connection string

catalogs:
- from: mssql
name: my_mssql
params:
mssql_connection_string: "Server=localhost,1433;Database=my_database;User Id=${secrets:MSSQL_USER};Password=${secrets:MSSQL_PASS};"

Individual parameters

catalogs:
- from: mssql
name: my_mssql
params:
mssql_host: localhost
mssql_port: '1433'
mssql_database: my_database
mssql_username: ${secrets:MSSQL_USER}
mssql_password: ${secrets:MSSQL_PASS}
mssql_encrypt: 'true'
mssql_trust_server_certificate: 'true'
Limitations

The MSSQL Catalog Connector supports SQL Server authentication (SQL Login and Password) only. Windows Authentication and Azure Active Directory authentication are not currently supported.

Secrets

Spice integrates with multiple secret stores to help manage sensitive data securely. For detailed information on supported secret stores, refer to the secret stores documentation. Additionally, learn how to use referenced secrets in component parameters by visiting the using referenced secrets guide.