Query federation for Synapse in Databricks SQL

Preview

This feature is Experimental. Experimental features are provided as-is and are not supported by Databricks through customer technical support channels.

Databricks SQL supports read-only query federation to Synapse on serverless and pro SQL warehouses. For details on configuring Synapse Azure Data Lake Storage Gen2 credentials, see Query data in Azure Synapse Analytics.

Connecting to Synapse with Databricks SQL

You configure connections to Synapse 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 synapse_table;
CREATE TABLE synapse_table
USING sqldw
OPTIONS (
  dbtable '<table-name>',
  tempdir 'abfss://<your-container-name>@<your-storage-account-name>.dfs.core.windows.net/<your-directory-name>',
  url 'jdbc:sqlserver://<database-host-url>',
  user secret('synapse_creds', 'my_username'),
  password secret('synapse_creds', 'my_password'),
  forwardSparkAzureStorageCredentials 'true'
);