Connect to SQL Server
Configure SQL Server gateways, develop locally with Docker, and prepare production deployment.
Connection options
This is the first hands-on stage. Complete access provisioning before this step.
Connect Vulcan directly or through a DataOS Depot. Direct connections support SQL Server username/password and Microsoft Entra ID authentication. Use a Depot for production.
Authentication methods
Username and password: Set
userandpasswordwithdriver: pymssql.Microsoft Entra ID: Install
mssql-odbc. Setdriver: pyodbc,driver_name, andodbc_properties.Inject passwords with
password: {{ env_var('MSSQL_PASSWORD') }}.
Properties in config.yaml
Set these properties under gateways.<name>.connection.
type
Engine type name. Must be mssql.
string
Yes
host
SQL Server instance hostname.
string
Yes
user
Authentication username.
string
No
password
Authentication password.
string
No
port
Port number. Default 1433.
int
No
database
Target database.
string
No
charset
Connection character set.
string
No
timeout
Query timeout in seconds.
int
No
login_timeout
Login timeout in seconds. Default 60.
int
No
appname
Connection application name.
string
No
conn_properties
Raw connection properties.
list[string]
No
autocommit
Enables autocommit. Default false.
bool
No
driver
pymssql or pyodbc. Default pymssql.
string
No
driver_name
ODBC driver name. Used with pyodbc.
string
No
odbc_properties
ODBC properties.
dict
No
Gateway configuration
Minimum local connection with pymssql:
Entra ID / Azure AD via pyodbc:
Local development with Docker
SQL Server runs locally through the official container image. Save this as docker/docker-compose.warehouse.yml:
Use the matching connection and DuckDB state:
Validate the connection:
--log-to-stdout avoids a .logs/ directory when the working directory is not writable.
Production deployment
Use a DataOS Depot for production. Configure type: depot and address: dataos://<mssql-depot-name>?purpose=rw.
Apply resources in this order: Secret, Depot, Git Secret, project configuration, then Vulcan resource.
secret-mssql.yaml
Stores the SQL login/password or Entra service-principal credentials.
depot-mssql.yaml
Registers host, database, driver, and binds purposes to the secret.
secret-git-sync.yaml
Stores repository credentials for git-sync.
config.yaml
Points the gateway at the Depot.
workspace-deploy.yaml
Defines the workflow and API using engine: mssql, the Depot, and the repository.
Two wiring styles are supported. Use a depot gateway, or use envFrom with an instance secret. Do not mix a depot gateway with conflicting environment variables.
Depot purposes
rw
Vulcan workflow
Reads sources and creates, updates, and deletes model output.
scan
Metadata scanner
Reads INFORMATION_SCHEMA and sys.* catalog views.
query
Consumer direct access
Read-only Data Product table access.
Next step
After the connection validates, choose model behavior in Materialization behavior.
Last updated
Was this helpful?