assets
Creates, updates, deletes, gets or lists an assets
resource.
Overview
Name | assets |
Type | Resource |
Id | databricks_workspace.cleanrooms.assets |
Fields
The following fields are returned by SELECT
queries:
- list
Request completed successfully.
Name | Datatype | Description |
---|---|---|
name | string | |
added_at | integer | |
asset_type | string | |
foreign_table | object | |
foreign_table_local_details | object | |
notebook | object | |
owner_collaborator_alias | string | |
status | string | |
table | object | |
table_local_details | object | |
view | object | |
view_local_details | object | |
volume_local_details | object |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | deployment_name | ||
create | insert | deployment_name | 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. | |
update | update | deployment_name | Update a clean room asset. For example, updating the content of a notebook; changing the shared partitions of a table; etc. | |
delete | delete | deployment_name | Delete 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.
Name | Datatype | Description |
---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
SELECT
examples
- list
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
- Manifest
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
;
# Description fields are for documentation purposes
- name: assets
props:
- name: deployment_name
value: string
description: Required parameter for the assets resource.
- name: name
value: string
- name: asset_type
value: string
- name: table_local_details
value: object
- name: volume_local_details
value: object
- name: view_local_details
value: object
- name: foreign_table_local_details
value: object
- name: table
value: object
- name: notebook
value: object
- name: view
value: object
- name: foreign_table
value: object
UPDATE
examples
- update
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
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;