Skip to main content

files

Creates, updates, deletes, gets or lists a files resource.

Overview

Namefiles
TypeResource
Iddatabricks_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:

NameAccessible byRequired ParamsOptional ParamsDescription
deletedeletedeployment_nameDeletes a file. If the request is successful, there is no response body.
downloadexecdeployment_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.
uploadexecdeployment_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.

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.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

DELETE examples

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

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;