directories
Creates, updates, deletes, gets or lists a directories
resource.
Overview
Name | directories |
Type | Resource |
Id | databricks_workspace.workspace.directories |
Fields
The following fields are returned by SELECT
queries:
- list
Name | Datatype | Description |
---|---|---|
object_id | integer | |
object_type | string | |
path | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | deployment_name | Lists the contents of a directory, or the object if it is not a directory. If the input path does not exist, this call returns an error | |
mkdirs | insert | deployment_name | Creates the specified directory (and necessary parent directories if they do not exist). If there is an object (not a directory) at any prefix of the input path, this call returns an error |
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
Lists the contents of a directory, or the object if it is not a directory. If the input path does not exist, this call returns an error
SELECT
object_id,
object_type,
path
FROM databricks_workspace.workspace.directories
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- mkdirs
- Manifest
Creates the specified directory (and necessary parent directories if they do not exist). If there is an object (not a directory) at any prefix of the input path, this call returns an error
INSERT INTO databricks_workspace.workspace.directories (
data__path,
deployment_name
)
SELECT
'{{ path }}',
'{{ deployment_name }}'
;
# Description fields are for documentation purposes
- name: directories
props:
- name: deployment_name
value: string
description: Required parameter for the directories resource.
- name: path
value: required