clean_rooms
Creates, updates, deletes, gets or lists a clean_rooms resource.
Overview
| Name | clean_rooms |
| Type | Resource |
| Id | databricks_workspace.cleanrooms.clean_rooms |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the clean room. It should follow `UC securable naming requirements <https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements>`__. |
access_restricted | string | Create a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />>>> class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access:<br /><br /> >>> Color.RED<br /> <Color.RED: 1><br /><br />- value lookup:<br /><br /> >>> Color(1)<br /> <Color.RED: 1><br /><br />- name lookup:<br /><br /> >>> Color['RED']<br /> <Color.RED: 1><br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />>>> len(Color)<br />3<br /><br />>>> list(Color)<br />[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]<br /><br />Methods can be added to enumerations, and members can have their own<br />attributes -- see the documentation for details. (CSP_MISMATCH, NO_RESTRICTION) |
comment | string | |
created_at | integer | When the clean room was created, in epoch milliseconds. |
enable_shared_output | boolean | Whether allow task to write to shared output schema. When enabled, clean room task runs triggered by the current collaborator can write to the run-scoped shared output schema which is accessible by all collaborators. |
local_collaborator_alias | string | The alias of the collaborator tied to the local clean room. |
output_catalog | object | Output catalog of the clean room. It is an output only field. Output catalog is manipulated using the separate CreateCleanRoomOutputCatalog API. |
owner | string | This is the Databricks username of the owner of the local clean room securable for permission management. |
remote_detailed_info | object | Central clean room details. During creation, users need to specify cloud_vendor, region, and collaborators.global_metastore_id. This field will not be filled in the ListCleanRooms call. |
replication_config | object | Replication setting for the calling collaborator's input share. Set via UpdateCleanRoom before the collaborator adds their first asset (immutable thereafter), and read back on GetCleanRoom. When enabled, that collaborator's input data is replicated into the central clean-room region. |
status | string | Clean room status. (ACTIVE, DELETED, FAILED, PROVISIONING) |
updated_at | integer | When the clean room was last updated, in epoch milliseconds. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the clean room. It should follow `UC securable naming requirements <https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements>`__. |
access_restricted | string | Create a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />>>> class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access:<br /><br /> >>> Color.RED<br /> <Color.RED: 1><br /><br />- value lookup:<br /><br /> >>> Color(1)<br /> <Color.RED: 1><br /><br />- name lookup:<br /><br /> >>> Color['RED']<br /> <Color.RED: 1><br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />>>> len(Color)<br />3<br /><br />>>> list(Color)<br />[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]<br /><br />Methods can be added to enumerations, and members can have their own<br />attributes -- see the documentation for details. (CSP_MISMATCH, NO_RESTRICTION) |
comment | string | |
created_at | integer | When the clean room was created, in epoch milliseconds. |
enable_shared_output | boolean | Whether allow task to write to shared output schema. When enabled, clean room task runs triggered by the current collaborator can write to the run-scoped shared output schema which is accessible by all collaborators. |
local_collaborator_alias | string | The alias of the collaborator tied to the local clean room. |
output_catalog | object | Output catalog of the clean room. It is an output only field. Output catalog is manipulated using the separate CreateCleanRoomOutputCatalog API. |
owner | string | This is the Databricks username of the owner of the local clean room securable for permission management. |
remote_detailed_info | object | Central clean room details. During creation, users need to specify cloud_vendor, region, and collaborators.global_metastore_id. This field will not be filled in the ListCleanRooms call. |
replication_config | object | Replication setting for the calling collaborator's input share. Set via UpdateCleanRoom before the collaborator adds their first asset (immutable thereafter), and read back on GetCleanRoom. When enabled, that collaborator's input data is replicated into the central clean-room region. |
status | string | Clean room status. (ACTIVE, DELETED, FAILED, PROVISIONING) |
updated_at | integer | When the clean room was last updated, in epoch milliseconds. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | name, deployment_name | Get the details of a clean room given its name. | |
list | select | deployment_name | page_size, page_token | Get a list of all clean rooms of the metastore. Only clean rooms the caller has access to are |
create | insert | deployment_name, clean_room | Create a new clean room with the specified collaborators. This method is asynchronous; the returned | |
update | update | name, deployment_name | Update a clean room. The caller must be the owner of the clean room, have MODIFY_CLEAN_ROOM | |
delete | delete | name, deployment_name | Delete a clean room. After deletion, the clean room will be removed from the metastore. If the other | |
create_output_catalog | exec | clean_room_name, deployment_name, output_catalog | Create the output catalog of 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.
| Name | Datatype | Description |
|---|---|---|
clean_room_name | string | Name of the clean room. |
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
name | string | Name of the clean room. |
page_size | integer | Maximum number of clean rooms to return (i.e., the page length). Defaults to 100. |
page_token | string | Opaque pagination token to go to next page based on previous query. |
SELECT examples
- get
- list
Get the details of a clean room given its name.
SELECT
name,
access_restricted,
comment,
created_at,
enable_shared_output,
local_collaborator_alias,
output_catalog,
owner,
remote_detailed_info,
replication_config,
status,
updated_at
FROM databricks_workspace.cleanrooms.clean_rooms
WHERE name = '{{ name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
Get a list of all clean rooms of the metastore. Only clean rooms the caller has access to are
SELECT
name,
access_restricted,
comment,
created_at,
enable_shared_output,
local_collaborator_alias,
output_catalog,
owner,
remote_detailed_info,
replication_config,
status,
updated_at
FROM databricks_workspace.cleanrooms.clean_rooms
WHERE deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
Create a new clean room with the specified collaborators. This method is asynchronous; the returned
INSERT INTO databricks_workspace.cleanrooms.clean_rooms (
clean_room,
deployment_name
)
SELECT
'{{ clean_room }}' /* required */,
'{{ deployment_name }}'
RETURNING
name,
access_restricted,
comment,
created_at,
enable_shared_output,
local_collaborator_alias,
output_catalog,
owner,
remote_detailed_info,
replication_config,
status,
updated_at
;
# Description fields are for documentation purposes
- name: clean_rooms
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the clean_rooms resource.
- name: clean_room
value:
access_restricted: "{{ access_restricted }}"
comment: "{{ comment }}"
created_at: {{ created_at }}
enable_shared_output: {{ enable_shared_output }}
local_collaborator_alias: "{{ local_collaborator_alias }}"
name: "{{ name }}"
output_catalog:
catalog_name: "{{ catalog_name }}"
status: "{{ status }}"
owner: "{{ owner }}"
remote_detailed_info:
central_clean_room_id: "{{ central_clean_room_id }}"
cloud_vendor: "{{ cloud_vendor }}"
collaborators:
- collaborator_alias: "{{ collaborator_alias }}"
display_name: "{{ display_name }}"
global_metastore_id: "{{ global_metastore_id }}"
invite_recipient_email: "{{ invite_recipient_email }}"
invite_recipient_workspace_id: {{ invite_recipient_workspace_id }}
organization_name: "{{ organization_name }}"
compliance_security_profile:
compliance_standards: "{{ compliance_standards }}"
is_enabled: {{ is_enabled }}
creator:
collaborator_alias: "{{ collaborator_alias }}"
display_name: "{{ display_name }}"
global_metastore_id: "{{ global_metastore_id }}"
invite_recipient_email: "{{ invite_recipient_email }}"
invite_recipient_workspace_id: {{ invite_recipient_workspace_id }}
organization_name: "{{ organization_name }}"
egress_network_policy: "{{ egress_network_policy }}"
enable_shared_output: {{ enable_shared_output }}
package_provider_collaborator_alias: "{{ package_provider_collaborator_alias }}"
region: "{{ region }}"
replication_config:
enabled: {{ enabled }}
schedule:
interval:
duration: "{{ duration }}"
status: "{{ status }}"
updated_at: {{ updated_at }}
UPDATE examples
- update
Update a clean room. The caller must be the owner of the clean room, have MODIFY_CLEAN_ROOM
UPDATE databricks_workspace.cleanrooms.clean_rooms
SET
clean_room = '{{ clean_room }}'
WHERE
name = '{{ name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
RETURNING
name,
access_restricted,
comment,
created_at,
enable_shared_output,
local_collaborator_alias,
output_catalog,
owner,
remote_detailed_info,
replication_config,
status,
updated_at;
DELETE examples
- delete
Delete a clean room. After deletion, the clean room will be removed from the metastore. If the other
DELETE FROM databricks_workspace.cleanrooms.clean_rooms
WHERE name = '{{ name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;
Lifecycle Methods
- create_output_catalog
Create the output catalog of the clean room.
EXEC databricks_workspace.cleanrooms.clean_rooms.create_output_catalog
@clean_room_name='{{ clean_room_name }}' --required,
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"output_catalog": "{{ output_catalog }}"
}'
;