asset_revisions
Creates, updates, deletes, gets or lists an asset_revisions resource.
Overview
| Name | asset_revisions |
| Type | Resource |
| Id | databricks_workspace.cleanrooms.asset_revisions |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | A 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_name | string | The name of the clean room this asset belongs to. This field is required for create operations and populated by the server for responses. |
added_at | integer | When the asset is added to the clean room, in epoch milliseconds. |
asset_type | 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. (FOREIGN_TABLE, NOTEBOOK_FILE, TABLE, VIEW, VOLUME) |
foreign_table | object | Foreign table details available to all collaborators of the clean room. Present if and only if **asset_type** is **FOREIGN_TABLE** |
foreign_table_local_details | object | Local details for a foreign that are only available to its owner. Present if and only if **asset_type** is **FOREIGN_TABLE** |
notebook | object | Notebook details available to all collaborators of the clean room. Present if and only if **asset_type** is **NOTEBOOK_FILE** |
owner_collaborator_alias | string | The alias of the collaborator who owns this asset |
status | string | Status of the asset (ACTIVE, PENDING, PERMISSION_DENIED) |
table | object | Table details available to all collaborators of the clean room. Present if and only if **asset_type** is **TABLE** |
table_local_details | object | Local details for a table that are only available to its owner. Present if and only if **asset_type** is **TABLE** |
view | object | View details available to all collaborators of the clean room. Present if and only if **asset_type** is **VIEW** |
view_local_details | object | Local details for a view that are only available to its owner. Present if and only if **asset_type** is **VIEW** |
volume_local_details | object | Local details for a volume that are only available to its owner. Present if and only if **asset_type** is **VOLUME** |
| Name | Datatype | Description |
|---|---|---|
name | string | A 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_name | string | The name of the clean room this asset belongs to. This field is required for create operations and populated by the server for responses. |
added_at | integer | When the asset is added to the clean room, in epoch milliseconds. |
asset_type | 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. (FOREIGN_TABLE, NOTEBOOK_FILE, TABLE, VIEW, VOLUME) |
foreign_table | object | Foreign table details available to all collaborators of the clean room. Present if and only if **asset_type** is **FOREIGN_TABLE** |
foreign_table_local_details | object | Local details for a foreign that are only available to its owner. Present if and only if **asset_type** is **FOREIGN_TABLE** |
notebook | object | Notebook details available to all collaborators of the clean room. Present if and only if **asset_type** is **NOTEBOOK_FILE** |
owner_collaborator_alias | string | The alias of the collaborator who owns this asset |
status | string | Status of the asset (ACTIVE, PENDING, PERMISSION_DENIED) |
table | object | Table details available to all collaborators of the clean room. Present if and only if **asset_type** is **TABLE** |
table_local_details | object | Local details for a table that are only available to its owner. Present if and only if **asset_type** is **TABLE** |
view | object | View details available to all collaborators of the clean room. Present if and only if **asset_type** is **VIEW** |
view_local_details | object | Local details for a view that are only available to its owner. Present if and only if **asset_type** is **VIEW** |
volume_local_details | object | Local 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | clean_room_name, asset_type.value, name, etag, asset_type, deployment_name | Get a specific revision of an asset | |
list | select | clean_room_name, asset_type.value, name, asset_type, deployment_name | page_size, page_token | List 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.
| Name | Datatype | Description |
|---|---|---|
asset_type | string | Asset type. Only NOTEBOOK_FILE is supported. |
asset_type.value | string | |
clean_room_name | string | Name of the clean room. |
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
etag | string | Revision etag to fetch. If not provided, the latest revision will be returned. |
name | string | Name of the asset. |
page_size | integer | Maximum number of asset revisions to return. Defaults to 10. |
page_token | string | Opaque pagination token to go to next page based on the previous query. |
SELECT examples
- get
- list
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
;
List revisions for 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 asset_type = '{{ asset_type }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;