eschutho opened a new pull request, #44281: URL: https://github.com/apache/superset/pull/44281
### SUMMARY Part of epic [sc-120993](https://app.shortcut.com/preset/story/120993) (migrate DB connections to the new dynamic connection form). Story: https://app.shortcut.com/preset/story/120995 Microsoft SQL Server uses a standard `host/port/username/password/database` connection, so this wires `MssqlEngineSpec` into the new dynamic connection form by mixing in `BasicParametersMixin` — exactly like `MySQLEngineSpec`/`PostgresEngineSpec`/`RedshiftEngineSpec`. As a result, `/api/v1/database/available/` now returns dynamic form parameters for MSSQL instead of the raw SQLAlchemy-URI box, and the form builds a `mssql+pymssql://user:pass@host:port/db` URI. Key design decisions: - **Driver / schema:** `default_driver = "pymssql"` (the packaged, recommended driver) and `parameters_schema = BasicParametersSchema()`. - **Encryption:** `pymssql` negotiates TLS at the TDS protocol level and has no encryption query parameter, so `encryption_parameters` is left empty. `get_parameters_from_uri` is overridden to report `encryption=False`; the base implementation derives that flag from an `all(...)` over the (empty) `encryption_parameters`, which would vacuously return `True` and cause edit-mode saves to fail when re-building the URI. - **`AzureSynapseSpec`:** it subclasses `MssqlEngineSpec` and keeps its own `pyodbc` `default_driver`. Because `pyodbc` is not a packaged driver, the dynamic form is **not** surfaced for Synapse in standard deployments (`available` only exposes the form when `default_driver in drivers`), preserving its existing SQLAlchemy-URI experience. If an operator installs `pyodbc`, the same schema builds a `mssql+pyodbc://…` URI. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — backend engine-spec change. Before: MSSQL showed the raw SQLAlchemy-URI box. After: MSSQL shows the dynamic host/port/username/password/database form. ### TESTING INSTRUCTIONS - `pytest tests/unit_tests/db_engine_specs/test_mssql.py` - Manually: in the "Connect a database" modal, select *Microsoft SQL Server* and confirm the dynamic form (host/port/user/password/database) appears and produces a `mssql+pymssql://…` URI. Confirm *Azure Synapse* is unaffected. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
