Skip to main content

clean_rooms

Operations on a clean_rooms resource.

Overview

Nameclean_rooms
TypeResource
Iddatabricks_workspace.cleanrooms.clean_rooms

Fields

NameDatatype
namestring
access_restrictedstring
commentstring
created_atinteger
local_collaborator_aliasstring
output_catalogobject
ownerstring
remote_detailed_infoobject
statusstring
updated_atinteger

Methods

NameAccessible byRequired ParamsDescription
getSELECTname, deployment_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
deleteDELETEname, deployment_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.
updateUPDATEname, deployment_nameUpdate a clean room. The caller must be the owner of the clean room, have

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new clean_rooms resource.

/*+ create */
INSERT INTO databricks_workspace.cleanrooms.clean_rooms (
deployment_name,
data__name,
data__remote_detailed_info,
data__owner,
data__comment
)
SELECT
'{{ deployment_name }}',
'{{ name }}',
'{{ remote_detailed_info }}',
'{{ owner }}',
'{{ comment }}'
;

UPDATE example

Updates a clean_rooms resource.

/*+ update */
-- replace field1, field2, etc. with the fields you want to update
UPDATE databricks_workspace.cleanrooms.clean_rooms
SET field1 = '{{ value1 }}',
field2 = '{{ value2 }}', ...
WHERE name = '{{ name }}' AND
deployment_name = '{{ deployment_name }}';

DELETE example

Deletes a clean_rooms resource.

/*+ delete */
DELETE FROM databricks_workspace.cleanrooms.clean_rooms
WHERE name = '{{ name }}' AND
deployment_name = '{{ deployment_name }}';