dbfs_directories
Operations on a dbfs_directories
resource.
Overview
Name | dbfs_directories |
Type | Resource |
Id | databricks_workspace.filemanagement.dbfs_directories |
Fields
Name | Datatype |
---|---|
file_size | integer |
is_dir | boolean |
modification_time | integer |
path | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list | SELECT | path, deployment_name | List the contents of a directory, or details of the file. If the file or directory does not exist, this call throws an exception with |
mkdirs | INSERT | deployment_name | Creates the given directory and necessary parent directories if they do not exist. If a file (not a directory) exists at any prefix of the input path, this call throws an exception with |
SELECT
examples
SELECT
file_size,
is_dir,
modification_time,
path
FROM databricks_workspace.filemanagement.dbfs_directories
WHERE path = '{{ path }}' AND
deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new dbfs_directories
resource.
- dbfs_directories
- Manifest
/*+ create */
INSERT INTO databricks_workspace.filemanagement.dbfs_directories (
deployment_name,
data__path
)
SELECT
'{{ deployment_name }}',
'{{ path }}'
;
- name: your_resource_model_name
props:
- name: path
value: /mnt/foo