Query federation for SQL Server in Databricks SQL
Preview
The configurations described here are Experimental. Experimental features are provided as-is and are not supported by Databricks through customer technical support. Unity Catalog support for query federation is in preview. To request access, contact your Databricks representative.
Databricks SQL supports read-only query federation to SQL Server on serverless and pro SQL warehouses.
Connecting to SQL Server with Databricks SQL
You configure connections to SQL Server at the table level. You can use secrets to store and access text credentials without displaying them in plaintext. See the following example:
DROP TABLE IF EXISTS sqlserver_table;
CREATE TABLE sqlserver_table
USING sqlserver
OPTIONS (
dbtable '<table-name>',
host '<database-host-url>',
port '1433',
database '<database-name>',
user secret('sqlserver_creds', 'my_username'),
password secret('sqlserver_creds', 'my_password')
);