Manage connections for Lakehouse Federation

Preview

This feature is in Public Preview.

This article describes how to list all Lakehouse Federation connections defined in a Unity Catalog metastore, get connection details, grant connection permissions, and drop connections using Catalog Explorer and SQL statements in notebooks or the Databricks SQL query editor.

See also Create a connection.

List connections

Permissions required: The list of connections returned depends on your role and permissions. Users with the USE CONNECTION privilege on the metastore see all connections. Otherwise, you can view only the connections for which you are the connection object owner or have some privilege on.

  1. In your Databricks workspace, click Catalog icon Catalog.

  2. In the left pane, expand the External Data menu and select Connections.

    The connections you have permission to see are listed, along with the URL, create date, owner, and comment.

Run the following command in a notebook or the Databricks SQL query editor. Optionally, replace <pattern> with a `LIKE` predicate.

SHOW CONNECTIONS [LIKE <pattern>];

Get connection details

Permissions required: Connection owner, USE CONNECTION privilege on the metastore, or some privilege on the connection.

  1. In your Databricks workspace, click Catalog icon Catalog.

  2. In the left pane, expand the External Data menu and select Connections.

  3. Find the connection and select it to view details.

Run the following command in a notebook or the Databricks SQL query editor.

DESCRIBE CONNECTION <connection-name>;

Grant and revoke permissions on connections

You can grant permission to use a connection to create foreign catalogs or to view details about a connection:

  • CREATE FOREIGN CATALOG grants the ability to create a foreign catalog as a read-only mirror of a database in the data source described by the connection.

  • USE CONNECTION grants the ability to view details about the connection.

Permissions required: Metastore admin or connection owner.

To grant permission to use a connection:

  1. In your Databricks workspace, click Catalog icon Catalog.

  2. In the left pane, expand the External Data menu and select Connections.

  3. Find the connection and select it.

  4. On the Permissions tab, click Grant.

  5. On the Grant on <connection-name> dialog, start typing the user or group name or click the user menu to browse and select users and groups.

  6. Select the privileges you want to grant.

    See the privilege descriptions in the section introduction.

  7. Click Grant.

To revoke a connection privilege:

  1. Follow the preceding steps to get to the Permissions tab for the connection.

  2. Select the user or group whose privilege you want to revoke.

  3. Click Revoke both on the tab and on the confirmation dialog.

To grant the ability to create a foreign catalog using a connection, run the following command in a notebook or the Databricks SQL query editor.

GRANT CREATE FOREIGN CATALOG ON CONNECTION <connection-name> TO <user-name>;

To grant the ability to view the connection, run the following:

GRANT USE CONNECTION ON CONNECTION <connection-name> TO <user-name>;

To revoke a privilege, run the following, where <privilege> is one of the privileges on the connection granted to the user:

REVOKE <privilege> ON CONNECTION <connection-name> FROM <user-name>;

Drop connections

Permissions required: Connection owner

  1. In your Databricks workspace, click Catalog icon Catalog.

  2. In the left pane, expand the External Data menu and select Connections.

  3. Find the connection and select it.

  4. Click the Kebab menu kebab menu (also known as the three-dot menu) and select Delete.

  5. On the confirmation dialog, click Delete.

Run the following command in a notebook or the Databricks SQL query editor.

DROP CONNECTION [IF EXISTS] <connection-name>;