clean_rooms
Operations on a clean_rooms
resource.
Overview
Name | clean_rooms |
Type | Resource |
Id | databricks_workspace.cleanrooms.clean_rooms |
Fields
Name | Datatype |
---|---|
name | string |
access_restricted | string |
comment | string |
created_at | integer |
local_collaborator_alias | string |
output_catalog | object |
owner | string |
remote_detailed_info | object |
status | string |
updated_at | integer |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | name, deployment_name | Get the details of a clean room given its name. |
list | SELECT | deployment_name | Get a list of all clean rooms of the metastore. Only clean rooms the caller has access to are returned. |
create | INSERT | deployment_name | 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 |
delete | DELETE | name, deployment_name | 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. |
update | UPDATE | name, deployment_name | Update a clean room. The caller must be the owner of the clean room, have |
SELECT
examples
- clean_rooms (list)
- clean_rooms (get)
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 }}';
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 name = '{{ name }}' AND
deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new clean_rooms
resource.
- clean_rooms
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: name
value: test-clean-room1
- name: remote_detailed_info
value:
central_clean_room_id: b5c8d856-ff41-4c5f-8ccd-2b13b44fec27
cloud_vendor: aws
region: us-west-2
collaborators:
- global_metastore_id: aws:us-west-2:aff56c64-a34e-4c1f-a24c-c2dd2889517a
organization_name: acme corporation
invite_recipient_workspace_id: 6822898386300992
invite_recipient_email: john.doe@databricks.com
collaborator_alias: creator
display_name: acme corporation
creator:
global_metastore_id: aws:us-west-2:aff56c64-a34e-4c1f-a24c-c2dd2889517a
organization_name: acme corporation
invite_recipient_workspace_id: 6822898386300992
invite_recipient_email: john.doe@databricks.com
collaborator_alias: creator
display_name: acme corporation
egress_network_policy:
internet_access:
restriction_mode: FULL_ACCESS
allowed_internet_destinations:
- destination: string
type: FQDN
protocol: TCP
allowed_storage_destinations:
- bucket_name: string
region: string
type: AWS_S3
azure_storage_account: string
allowed_paths:
- string
azure_storage_service: string
azure_dns_zone: string
azure_container: string
log_only_mode:
log_only_mode_type: ALL_SERVICES
workloads:
- DBSQL
compliance_security_profile:
is_enabled: true
compliance_standards:
- NONE
- name: owner
value: alice@example.com
- name: comment
value: This is a clean room for demo
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 }}';