TVL Managed Superset

Connect Microsoft SQL Server to Apache Superset 2026

Tutorial to connect Microsoft SQL Server to Apache Superset: driver, URI, Azure SQL, authentication.

Microsoft SQL Server remains massively used in Microsoft-centric organizations. Connecting Apache Superset to SQL Server (on-premise or Azure SQL) is straightforward with the right driver. This tutorial details the procedure for 2026.

1. Prerequisites

  • An accessible Superset instance;
  • A SQL Server 2017+ or Azure SQL Database reachable;
  • A read-only account;
  • The pymssql or pyodbc driver installed.

If you want to start quickly, TVL Managed Superset includes SQL Server drivers by default.

2. Create a read-only account

-- On SQL Server
CREATE LOGIN superset_reader WITH PASSWORD = 'XXX';
USE prod;
CREATE USER superset_reader FOR LOGIN superset_reader;
ALTER ROLE db_datareader ADD MEMBER superset_reader;

3. Driver and URI

With pymssql (recommended)

uv pip install pymssql

# URI
mssql+pymssql://<user>:<password>@<host>:1433/<database>

With pyodbc (Azure SQL)

uv pip install pyodbc

# Azure SQL URI
mssql+pyodbc://<user>:<password>@<server>.database.windows.net:1433/<db>?driver=ODBC+Driver+18+for+SQL+Server

4. Add to Superset

  1. UI → Settings → Database Connections → + Database;
  2. Type: Microsoft SQL Server;
  3. Paste the URI;
  4. Test → Save.

5. Azure AD authentication

For Azure SQL with Azure AD auth:

mssql+pyodbc://@<server>.database.windows.net/<db>?driver=ODBC+Driver+18+for+SQL+Server&authentication=ActiveDirectoryMsi

Or with service principal:

mssql+pyodbc://<client_id>:<client_secret>@<server>.database.windows.net/<db>?driver=ODBC+Driver+18+for+SQL+Server&authentication=ActiveDirectoryServicePrincipal

This configuration is applied by default on TVL Managed Superset, which follows community best practices.

6. Optimization

  • Columnstore index SQL Server for analytical workloads;
  • Read-only replica on Azure SQL;
  • Aggressive Superset cache on executive dashboards;
  • Connection pool sized according to Azure SQL tier.

7. Common pitfalls

  • "Login failed": Azure SQL firewall must allow Superset IP (Server → Networking → Firewall rules);
  • ODBC Driver missing: install msodbcsql18 in the Superset container;
  • Encoding: SQL Server 2017+ supports UTF-8 but requires UTF-8 collation;
  • Long timeout: adjust SQLALCHEMY_ENGINE_OPTIONS with connect_timeout=30.

8. Conclusion

Microsoft SQL Server + Apache Superset is a solid combo for Microsoft organizations. For Azure SQL, Azure AD authentication brings a higher level of security. For purely analytical loads, consider Azure Synapse or regular export to BigQuery / Snowflake.

Want the benefits of Apache Superset without the friction of installation and maintenance? Deploy your instance in 3 clicks with TVL Managed Superset, hosted in Europe (OVHcloud, Roubaix, France).

For more: connect PostgreSQL, SSO Azure AD, vs Power BI.