Skip to main content

asset_revisions

Creates, updates, deletes, gets or lists an asset_revisions resource.

Overview

Nameasset_revisions
TypeResource
Iddatabricks_workspace.cleanrooms.asset_revisions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringA fully qualified name that uniquely identifies the asset within the clean room. This is also the name displayed in the clean room UI. For UC securable assets (tables, volumes, etc.), the format is *shared_catalog*.*shared_schema*.*asset_name* For notebooks, the name is the notebook file name. For jar analyses, the name is the jar analysis name.
clean_room_namestringThe name of the clean room this asset belongs to. This field is required for create operations and populated by the server for responses.
added_atintegerWhen the asset is added to the clean room, in epoch milliseconds.
asset_typestringCreate a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />&gt;&gt;&gt; class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access:<br /><br /> &gt;&gt;&gt; Color.RED<br /> &lt;Color.RED: 1&gt;<br /><br />- value lookup:<br /><br /> &gt;&gt;&gt; Color(1)<br /> &lt;Color.RED: 1&gt;<br /><br />- name lookup:<br /><br /> &gt;&gt;&gt; Color['RED']<br /> &lt;Color.RED: 1&gt;<br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />&gt;&gt;&gt; len(Color)<br />3<br /><br />&gt;&gt;&gt; list(Color)<br />[&lt;Color.RED: 1&gt;, &lt;Color.BLUE: 2&gt;, &lt;Color.GREEN: 3&gt;]<br /><br />Methods can be added to enumerations, and members can have their own<br />attributes -- see the documentation for details. (FOREIGN_TABLE, NOTEBOOK_FILE, TABLE, VIEW, VOLUME)
foreign_tableobjectForeign table details available to all collaborators of the clean room. Present if and only if **asset_type** is **FOREIGN_TABLE**
foreign_table_local_detailsobjectLocal details for a foreign that are only available to its owner. Present if and only if **asset_type** is **FOREIGN_TABLE**
notebookobjectNotebook details available to all collaborators of the clean room. Present if and only if **asset_type** is **NOTEBOOK_FILE**
owner_collaborator_aliasstringThe alias of the collaborator who owns this asset
statusstringStatus of the asset (ACTIVE, PENDING, PERMISSION_DENIED)
tableobjectTable details available to all collaborators of the clean room. Present if and only if **asset_type** is **TABLE**
table_local_detailsobjectLocal details for a table that are only available to its owner. Present if and only if **asset_type** is **TABLE**
viewobjectView details available to all collaborators of the clean room. Present if and only if **asset_type** is **VIEW**
view_local_detailsobjectLocal details for a view that are only available to its owner. Present if and only if **asset_type** is **VIEW**
volume_local_detailsobjectLocal details for a volume that are only available to its owner. Present if and only if **asset_type** is **VOLUME**

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectclean_room_name, asset_type.value, name, etag, asset_type, deployment_nameGet a specific revision of an asset
listselectclean_room_name, asset_type.value, name, asset_type, deployment_namepage_size, page_tokenList revisions for an asset

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
asset_typestringAsset type. Only NOTEBOOK_FILE is supported.
asset_type.valuestring
clean_room_namestringName of the clean room.
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
etagstringRevision etag to fetch. If not provided, the latest revision will be returned.
namestringName of the asset.
page_sizeintegerMaximum number of asset revisions to return. Defaults to 10.
page_tokenstringOpaque pagination token to go to next page based on the previous query.

SELECT examples

Get a specific revision of an asset

SELECT
name,
clean_room_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.asset_revisions
WHERE clean_room_name = '{{ clean_room_name }}' -- required
AND asset_type.value = '{{ asset_type.value }}' -- required
AND name = '{{ name }}' -- required
AND etag = '{{ etag }}' -- required
AND asset_type = '{{ asset_type }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;