dbfs_rm | R Documentation |
Delete the file or directory (optionally recursively delete all files in the directory). This call throws an exception with IO_ERROR if the path is a non-empty directory and recursive is set to false or on other similar errors. When you delete a large number of files, the delete operation is done in increments. The call returns a response after approximately 45s with an error message (503 Service Unavailable) asking you to re-invoke the delete operation until the directory structure is fully deleted.
dbfs_rm(path, recursive = "false", workspace, token = NULL, verbose = T, ...)
path |
A string representing the path to delete in DBFS |
recursive |
Should the deletes be recursive or not? Defaults to 'false' |
workspace |
A string representing the web workspace of your Databricks instance. E.g., "https://eastus2.azuredatabricks.net" or "https://demo.cloud.databricks.com". |
token |
A valid authentication token generated via User Settings in Databricks or via the Databricks REST API 2.0. If none is provided, netrc will be used |
verbose |
If TRUE, will print the API response to the console. Defaults to FALSE. |
... |
Additional options to be passed |
The API endpoint for creating a path on DBFS is '2.0/dbfs/delete'. For all details on API calls please see the official documentation at https://docs.databricks.com/dev-tools/api/latest/.
The API response
# No need to include /dbfs/ path <- "/rk/data/new_dir" dbfs_rm(path = path, workspace = workspace)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.