Skip to main content

files

Operations on a files resource.

Overview

Namefiles
TypeResource
Iddatabricks_workspace.filemanagement.files

SELECT not supported for this resource, see the methods section for supported operations.

Methods

NameAccessible byRequired ParamsDescription
deleteDELETEfile_path, deployment_nameDeletes a file. If the request is successful, there is no response body.
downloadEXECfile_path, deployment_nameDownloads 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.
uploadEXECfile_path, deployment_nameUploads 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.

DELETE example

Deletes a files resource.

/*+ delete */
DELETE FROM databricks_workspace.filemanagement.files
WHERE file_path = '{{ file_path }}' AND
deployment_name = '{{ deployment_name }}';