Skip to main content

clean_rooms

Creates, updates, deletes, gets or lists a clean_rooms resource.

Overview

Nameclean_rooms
TypeResource
Iddatabricks_workspace.cleanrooms.clean_rooms

Fields

The following fields are returned by SELECT queries:

Request completed successfully.

NameDatatypeDescription
namestring
access_restrictedstring
commentstring
created_atinteger
local_collaborator_aliasstring
output_catalogobject
ownerstring
remote_detailed_infoobject
statusstring
updated_atinteger

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdeployment_nameGet the details of a clean room given its name.
listselectdeployment_nameGet a list of all clean rooms of the metastore. Only clean rooms the caller has access to are returned.
createinsertdeployment_nameCreate a new clean room with the specified collaborators. This method is asynchronous; the returned name field inside the clean_room field can be used to poll the clean room status, using the
updateupdatedeployment_nameUpdate a clean room. The caller must be the owner of the clean room, have
deletedeletedeployment_nameDelete a clean room. After deletion, the clean room will be removed from the metastore. If the other collaborators have not deleted the clean room, they will still have the clean room in their metastore, but it will be in a DELETED state and no operations other than deletion can be performed on it.

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

Get the details of a clean room given its name.

SELECT
name,
access_restricted,
comment,
created_at,
local_collaborator_alias,
output_catalog,
owner,
remote_detailed_info,
status,
updated_at
FROM databricks_workspace.cleanrooms.clean_rooms
WHERE deployment_name = '{{ deployment_name }}' -- required;

INSERT examples

Create a new clean room with the specified collaborators. This method is asynchronous; the returned name field inside the clean_room field can be used to poll the clean room status, using the

INSERT INTO databricks_workspace.cleanrooms.clean_rooms (
data__name,
data__owner,
data__comment,
data__remote_detailed_info,
deployment_name
)
SELECT
'{{ name }}',
'{{ owner }}',
'{{ comment }}',
'{{ remote_detailed_info }}',
'{{ deployment_name }}'
RETURNING
name,
access_restricted,
comment,
created_at,
local_collaborator_alias,
output_catalog,
owner,
remote_detailed_info,
status,
updated_at
;

UPDATE examples

Update a clean room. The caller must be the owner of the clean room, have

UPDATE databricks_workspace.cleanrooms.clean_rooms
SET
data__clean_room = '{{ clean_room }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
name,
access_restricted,
comment,
created_at,
local_collaborator_alias,
output_catalog,
owner,
remote_detailed_info,
status,
updated_at;

DELETE examples

Delete a clean room. After deletion, the clean room will be removed from the metastore. If the other collaborators have not deleted the clean room, they will still have the clean room in their metastore, but it will be in a DELETED state and no operations other than deletion can be performed on it.

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