Pular para o conteúdo principal

gerenciar conexões para a lakehouse Federation

Este artigo descreve como listar todas as conexões da Lakehouse Federation definidas em um metastore Unity Catalog, obter detalhes da conexão, conceder permissões de conexão e descartar conexões usando o Catalog Explorer e as instruções SQL no Notebook ou no editor de consultas Databricks SQL. Uma conexão é um objeto seguro no Unity Catalog que especifica um caminho e credenciais para acessar um sistema de banco de dados externo.

Consulte também Criar uma conexão.

Se o senhor preferir usar a API REST, consulte a documentação de referência da Databricks.

Listar conexões

Permissões necessárias : a lista de conexões retornadas depende de sua função e permissões. Usuários com o privilégio USE CONNECTION no metastore veem todas as conexões. Caso contrário, o senhor pode view apenas as conexões das quais é o proprietário do objeto de conexão ou tem algum privilégio.

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

  2. At the top of the Catalog pane, click the Gear icon gear icon and select Connections from the menu.

    Alternatively, from the Quick access page, click the External data > button and go to the Connections tab.

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

Obtenha detalhes da conexão

Permissões necessárias : proprietário da conexão, privilégio USE CONNECTION na metastore ou algum privilégio na conexão.

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

  2. At the top of the Catalog pane, click the Gear icon gear icon and select Connections from the menu.

    Alternatively, from the Quick access page, click the External data > button and go to the Connections tab.

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

Conceder e revogar permissões em conexões

O senhor pode conceder permissão para usar uma conexão para criar catálogos estrangeiros ou para view detalhes sobre uma conexão:

  • CREATE FOREIGN CATALOG concede a capacidade de criar um catálogo externo como um espelho somente leitura de um banco de dados na fonte de dados descrita pela conexão.
  • USE CONNECTION concede a capacidade de usar a conexão no DLT para ingerir dados da fonte de dados em Databricks. No entanto, se concedido no nível do metastore, ele só permite visualizar os detalhes das conexões no metastore. Os usuários ainda precisam receber USE CONNECTION em conexões individuais para usá-las.

Permissões necessárias : administrador do Metastore ou proprietário da conexão.

To grant permission to use a connection:

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

  2. At the top of the Catalog pane, click the Gear icon gear icon and select Connections from the menu.

    Alternatively, from the Quick access page, click the External data > button and go to the Connections tab.

  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.

Descarte conexões

Permissões necessárias : Proprietário da conexão

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

  2. At the top of the Catalog pane, click the Gear icon gear icon and select Connections from the menu.

    Alternatively, from the Quick access page, click the External data > button and go to the Connections tab.

  3. Find the connection and select it.

  4. Click the Kebab menu kebab menu and select Delete.

  5. On the confirmation dialog, click Delete.