Delta Sharing データ共有へのアクセスを管理する (プロバイダー向け)
この記事では、データ受信者に Delta Sharing 共有へのアクセス権を付与する方法について説明します。 また、アクセスを表示、更新、および取り消す方法についても説明します。
必要条件
受信者とデータを共有するには:
- Unity Catalog メタストアがアタッチされている Databricks ワークスペースを使用する必要があります。
- Unity-Catalog 対応のクラスター アクセス モードを使用する SQLウェアハウスまたはクラスターを使用する必要があります。
- 共有と受取人はすでに定義されている必要があります。
- 次のいずれかである必要があります。
- メタストア管理者。
- 共有オブジェクトと受信者オブジェクト (
USE SHARE
+SET SHARE PERMISSION
) または共有の所有者) および (USE RECIPIENT
または受信者の所有者) の両方に対する委任されたアクセス許可または所有権を持つユーザー。
共有するためのアクセス権を受信者に付与する
受信者に共有アクセス権を付与するには、カタログ エクスプローラー、DatabricksUnity CatalogCLI 、またはSQL DatabricksノートブックまたはDatabricks SQL クエリ エディターの コマンドを使用できます。
必要な権限 : 次のいずれかです。
- メタストア管理者。
- 共有オブジェクトと受信者オブジェクト ((
USE SHARE
+SET SHARE PERMISSION
) または共有の所有者) および (USE RECIPIENT
または受信者の所有者) の両方に対する委任されたアクセス許可または所有権。
- 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"
]
}
]
}'
共有への受信者のアクセスを取り消す
共有への受信者のアクセスを取り消すには、Catalog Explorer、Databricks Unity Catalog CLI、または Databricks ノートブックまたは Databricks SQL クエリエディターの REVOKE ON SHARE
SQL コマンドを使用できます。
必要なアクセス許可 : メタストア管理者、 USE SHARE
権限を持つユーザー、または共有オブジェクトの所有者。
- 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"
]
}
]
}'
株式の交付金や受取人が保有する助成金を表示します
共有の現在の許可を表示するには、Catalog Explorer、Databricks Unity Catalog CLI、または Databricks ノートブックまたは Databricks SQL クエリエディターの SHOW GRANTS ON SHARE
SQL コマンドを使用できます。
必要なアクセス許可 : 共有へのアクセス権を付与された受信者を表示する場合は、メタストア管理者、 USE SHARE
権限を持つユーザー、または共有オブジェクトの所有者である必要があります。 受信者に付与された共有を表示する場合は、メタストア管理者、 USE RECIPIENT
権限を持つユーザー、または受信者オブジェクトの所有者である必要があります。
- 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>
受信者が現在所有している共有権限を表示するには、カタログ エクスプローラー、Databricks CLI、または Databricks ノートブックまたは Databricks SQL クエリ エディターの SHOW GRANTS TO RECIPIENT
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>