directory_contents
Creates, updates, deletes, gets or lists a directory_contents
resource.
Overview
Name | directory_contents |
Type | Resource |
Id | databricks_workspace.filemanagement.directory_contents |
Fields
The following fields are returned by SELECT
queries:
- listdirectorycontents
An array of DirectoryEntry for the contents of the directory. If next_page_token
is set, there may be more entries in the directory.
Name | Datatype | Description |
---|---|---|
name | string | |
file_size | integer | |
is_directory | boolean | |
last_modified | integer | |
path | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
listdirectorycontents | select | deployment_name | Returns the contents of a directory. If there is no directory at the specified path, the API returns a HTTP 404 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
- listdirectorycontents
Returns the contents of a directory. If there is no directory at the specified path, the API returns a HTTP 404 error.
SELECT
name,
file_size,
is_directory,
last_modified,
path
FROM databricks_workspace.filemanagement.directory_contents
WHERE deployment_name = '{{ deployment_name }}' -- required;