Gerenciar o acesso ao compartilhamento de dados Delta Sharing (para provedores)
Este artigo explica como conceder a um destinatário de dados acesso a um compartilhamento Delta Sharing. Ele também explica como view, atualizar e revogar o acesso.
Requisitos
Para compartilhar dados com os destinatários:
- O senhor deve usar um Databricks workspace que tenha um metastore Unity Catalog anexado.
- O senhor deve usar um SQL warehouse ou clustering que use um modo de acesso de clustering compatível com o Unity-Catalog.
- As ações e os destinatários já devem estar definidos.
- Você deve ser um dos seguintes:
- Administrador do Metastore.
- Usuário com permissões ou propriedade delegadas no compartilhamento e nos objetos do destinatário ((
USE SHARE
+SET SHARE PERMISSION
) ou proprietário do compartilhamento) E (USE RECIPIENT
ou proprietário do destinatário).
Conceder ao destinatário acesso para compartilhar
Para conceder acesso de compartilhamento aos destinatários, o senhor pode usar o Catalog Explorer, o Databricks Unity Catalog CLI, ou SQL comando em um Databricks Notebook ou o editor de consultas Databricks SQL.
Permissões necessárias : uma das seguintes opções:
- Administrador do Metastore.
- Permissões ou propriedade delegadas no compartilhamento e nos objetos do destinatário ((
USE SHARE
+SET SHARE PERMISSION
) ou proprietário do compartilhamento) E (USE RECIPIENT
ou proprietário do destinatário).
- Catalog Explorer
- SQL
- CLI
To add recipients to a share, starting at the share v:
-
In your Databricks workspace, click
Catalog.
-
At the top of the Catalog pane, click the
gear icon and select Delta Sharing.
Alternatively, from the Quick access page, click the Delta Sharing > button.
-
On the Shared by me tab, find and select the share.
-
Click Add recipient.
-
On the Add recipient dialog, start typing the recipient name or click the drop-down menu to select the recipients you want to add to the share.
-
Click Add.
To grant share access to a recipient, starting at the recipient:
-
In your Databricks workspace, click
Catalog.
-
At the top of the Catalog pane, click the
gear icon and select Delta Sharing.
Alternatively, from the Quick access page, click the Delta Sharing > button.
-
On the Shared by me tab, click Recipients and select the recipient.
-
Click Grant share.
-
On the Grant share dialog, start typing the share name or click the drop-down menu to select the shares you want to grant.
-
Click Grant.
Run the following command in a notebook or the Databricks SQL query editor.
GRANT SELECT ON SHARE <share-name> TO RECIPIENT <recipient-name>;
SELECT
is the only privilege that you can grant a recipient on a share.
Run the following command using the Databricks CLI. Replace <share-name>
with the name of the share you want to grant to the recipient, and replace <recipient-name>
with the recipient’s name. SELECT
is the only privilege that you can grant on a share.
databricks shares update <share-name> \
--json='{
"changes": [
{
"principal": "<recipient-name>",
"add": [
"SELECT"
]
}
]
}'
Revogar o acesso do destinatário a um compartilhamento
Para revogar o acesso de um destinatário a um compartilhamento, o senhor pode usar o Catalog Explorer, o Databricks Unity Catalog CLI, ou o comando REVOKE ON SHARE
SQL em um Databricks Notebook ou o editor de consultas Databricks SQL.
Permissões necessárias : administrador do Metastore, usuário com o privilégio USE SHARE
ou proprietário do objeto compartilhado.
- Catalog Explorer
- SQL
- CLI
To revoke a recipient’s access to a share, starting at the share:
-
In your Databricks workspace, click
Catalog.
-
At the top of the Catalog pane, click the
gear icon and select Delta Sharing.
Alternatively, from the Quick access page, click the Delta Sharing > button.
-
On the Shared by me tab, find and select the share.
-
On the Recipients tab, find the recipient.
-
Click the
kebab menu and select Revoke.
-
On the confirmation dialog, click Revoke.
To revoke a recipient’s access to a share, starting at the recipient:
-
In your Databricks workspace, click
Catalog.
-
At the top of the Catalog pane, click the
gear icon and select Delta Sharing.
Alternatively, from the Quick access page, click the Delta Sharing > button.
-
On the Shared by me tab, click Recipients and select the recipient.
-
On the Shares tab, find the share.
-
Click the
kebab menu on the share row and select Revoke.
-
On the confirmation dialog, click Revoke.
Run the following command in a notebook or the Databricks SQL query editor.
REVOKE SELECT ON SHARE <share-name> FROM RECIPIENT <recipient-name>;
Run the following command using the Databricks CLI. Replace <share-name>
with the name of the share you want to remove for the recipient, and replace <recipient-name>
with the recipient’s name. SELECT
is the only privilege that you can remove for a recipient.
databricks shares update <share-name> \
--json='{
"changes": [
{
"principal": "<recipient-name>",
"remove": [
"SELECT"
]
}
]
}'
visualizar subsídios em uma ação ou subsídios possuídos por um destinatário
Para view as concessões atuais em um compartilhamento, o senhor pode usar o Catalog Explorer, o Databricks Unity Catalog CLI, ou o comando SHOW GRANTS ON SHARE
SQL em um Databricks Notebook ou o editor de consultas Databricks SQL.
Permissões necessárias : se você estiver visualizando destinatários com acesso a um compartilhamento, você deve ser administrador da metastore, usuário com o privilégio USE SHARE
ou proprietário do objeto de compartilhamento. Se você estiver visualizando compartilhamentos concedidos a um destinatário, você deve ser um administrador da metastore, um usuário com o privilégio USE RECIPIENT
ou o proprietário do objeto do destinatário.
- Catalog Explorer
- SQL
- CLI
To view recipients with access to a share:
-
In your Databricks workspace, click
Catalog.
-
At the top of the Catalog pane, click the
gear icon and select Delta Sharing.
Alternatively, from the Quick access page, click the Delta Sharing > button.
-
On the Shared by me tab, find and select the share.
-
Go to the Recipients tab to view all recipients who have access to the share.
Run the following command in a notebook or the Databricks SQL query editor.
SHOW GRANT ON SHARE <share-name>;
Run the following command using the Databricks CLI.
databricks shares share-permissions <share-name>
Para view as atuais concessões de ações possuídas por um destinatário, o senhor pode usar o Catalog Explorer, o Databricks CLI, ou o SHOW GRANTS TO RECIPIENT
SQL comando em um Databricks Notebook ou o editor de consultas Databricks SQL.
- Catalog Explorer
- SQL
- CLI
To view shares granted to a recipient:
-
In your Databricks workspace, click
Catalog.
-
At the top of the Catalog pane, click the
gear icon and select Delta Sharing.
Alternatively, from the Quick access page, click the Delta Sharing > button.
-
On the Shared by me tab, click Recipients and select the recipient.
-
Go to the Shares tab to view all shares that the recipient has access to.
Run the following command in a notebook or the Databricks SQL query editor.
SHOW GRANTS TO RECIPIENT <recipient-name>;
Run the following command using the Databricks CLI.
databricks recipients share-permissions <recipient-name>