Skip to main content

assets

Creates, updates, deletes, gets or lists an assets resource.

Overview

Nameassets
TypeResource
Iddatabricks_workspace.cleanrooms.assets

Fields

The following fields are returned by SELECT queries:

Request completed successfully.

NameDatatypeDescription
namestring
added_atinteger
asset_typestring
foreign_tableobject
foreign_table_local_detailsobject
notebookobject
owner_collaborator_aliasstring
statusstring
tableobject
table_local_detailsobject
viewobject
view_local_detailsobject
volume_local_detailsobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectdeployment_name
createinsertdeployment_nameCreate a clean room asset —share an asset like a notebook or table into the clean room. For each UC asset that is added through this method, the clean room owner must also have enough privilege on the asset to consume it. The privilege must be maintained indefinitely for the clean room to be able to access the asset. Typically, you should use a group as the clean room owner.
updateupdatedeployment_nameUpdate a clean room asset. For example, updating the content of a notebook; changing the shared partitions of a table; etc.
deletedeletedeployment_nameDelete a clean room asset - unshare/remove the asset from the clean room

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

Request completed successfully.

SELECT
name,
added_at,
asset_type,
foreign_table,
foreign_table_local_details,
notebook,
owner_collaborator_alias,
status,
table,
table_local_details,
view,
view_local_details,
volume_local_details
FROM databricks_workspace.cleanrooms.assets
WHERE deployment_name = '{{ deployment_name }}' -- required;

INSERT examples

Create a clean room asset —share an asset like a notebook or table into the clean room. For each UC asset that is added through this method, the clean room owner must also have enough privilege on the asset to consume it. The privilege must be maintained indefinitely for the clean room to be able to access the asset. Typically, you should use a group as the clean room owner.

INSERT INTO databricks_workspace.cleanrooms.assets (
data__name,
data__asset_type,
data__table_local_details,
data__volume_local_details,
data__view_local_details,
data__foreign_table_local_details,
data__table,
data__notebook,
data__view,
data__foreign_table,
deployment_name
)
SELECT
'{{ name }}',
'{{ asset_type }}',
'{{ table_local_details }}',
'{{ volume_local_details }}',
'{{ view_local_details }}',
'{{ foreign_table_local_details }}',
'{{ table }}',
'{{ notebook }}',
'{{ view }}',
'{{ foreign_table }}',
'{{ deployment_name }}'
RETURNING
name,
added_at,
asset_type,
foreign_table,
foreign_table_local_details,
notebook,
owner_collaborator_alias,
status,
table,
table_local_details,
view,
view_local_details,
volume_local_details
;

UPDATE examples

Update a clean room asset. For example, updating the content of a notebook; changing the shared partitions of a table; etc.

UPDATE databricks_workspace.cleanrooms.assets
SET
data__name = '{{ name }}',
data__asset_type = '{{ asset_type }}',
data__table_local_details = '{{ table_local_details }}',
data__volume_local_details = '{{ volume_local_details }}',
data__view_local_details = '{{ view_local_details }}',
data__foreign_table_local_details = '{{ foreign_table_local_details }}',
data__table = '{{ table }}',
data__notebook = '{{ notebook }}',
data__view = '{{ view }}',
data__foreign_table = '{{ foreign_table }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
name,
added_at,
asset_type,
foreign_table,
foreign_table_local_details,
notebook,
owner_collaborator_alias,
status,
table,
table_local_details,
view,
view_local_details,
volume_local_details;

DELETE examples

Delete a clean room asset - unshare/remove the asset from the clean room

DELETE FROM databricks_workspace.cleanrooms.assets
WHERE deployment_name = '{{ deployment_name }}' --required;