directories
Operations on a directories
resource.
Overview
Name | directories |
Type | Resource |
Id | databricks_workspace.workspace.directories |
Fields
Name | Datatype |
---|---|
object_id | integer |
object_type | string |
path | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list | SELECT | path, 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 |
SELECT
examples
SELECT
object_id,
object_type,
path
FROM databricks_workspace.workspace.directories
WHERE path = '{{ path }}' AND
deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new directories
resource.
- directories
- Manifest
/*+ create */
INSERT INTO databricks_workspace.workspace.directories (
deployment_name,
data__path
)
SELECT
'{{ deployment_name }}',
'{{ path }}'
;
- name: your_resource_model_name
props:
- name: path
value: /Users/user@example.com/project