files
Creates, updates, deletes, gets or lists a files
resource.
Overview
Name | files |
Type | Resource |
Id | databricks_workspace.filemanagement.files |
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 a file. If the request is successful, there is no response body. | |
download | exec | deployment_name | Downloads a file. The file contents are the response body. This is a standard HTTP file download, not a JSON RPC. It supports the Range and If-Unmodified-Since HTTP headers. | |
upload | exec | deployment_name | Uploads a file of up to 5 GiB. The file contents should be sent as the request body as raw bytes (an octet stream); do not encode or otherwise modify the bytes before sending. The contents of the resulting file will be exactly the bytes sent in the request body. If the request is successful, there is no response body. |
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 a file. If the request is successful, there is no response body.
DELETE FROM databricks_workspace.filemanagement.files
WHERE deployment_name = '{{ deployment_name }}' --required;
Lifecycle Methods
- download
- upload
Downloads a file. The file contents are the response body. This is a standard HTTP file download, not a JSON RPC. It supports the Range and If-Unmodified-Since HTTP headers.
EXEC databricks_workspace.filemanagement.files.download
@deployment_name='{{ deployment_name }}' --required;
Uploads a file of up to 5 GiB. The file contents should be sent as the request body as raw bytes (an octet stream); do not encode or otherwise modify the bytes before sending. The contents of the resulting file will be exactly the bytes sent in the request body. If the request is successful, there is no response body.
EXEC databricks_workspace.filemanagement.files.upload
@deployment_name='{{ deployment_name }}' --required;