objects
Creates, updates, deletes, gets or lists an objects resource.
Overview
| Name | objects |
| Type | Resource |
| Id | databricks_workspace.workspace.objects |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
delete | delete | deployment_name | Deletes an object or a directory (and optionally recursively deletes all objects in the directory). | |
export | exec | deployment_name | Exports an object or the contents of an entire directory. | |
import | exec | deployment_name | Imports a workspace object (for example, a notebook or file) or the contents of an entire directory. If |
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) |
DELETE examples
- delete
Deletes an object or a directory (and optionally recursively deletes all objects in the directory).
DELETE FROM databricks_workspace.workspace.objects
WHERE deployment_name = '{{ deployment_name }}' --required;
Lifecycle Methods
- export
- import
Exports an object or the contents of an entire directory.
EXEC databricks_workspace.workspace.objects.export
@deployment_name='{{ deployment_name }}' --required;
Imports a workspace object (for example, a notebook or file) or the contents of an entire directory. If
EXEC databricks_workspace.workspace.objects.import
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"path": "{{ path }}",
"format": "{{ format }}",
"language": "{{ language }}",
"content": "{{ content }}",
"overwrite": "{{ overwrite }}"
}';