capabilities.work

Safely Delete a Workspace Directory

A 3-step recipe with Azure Databricks. We can help you get access.

Recipe · 3 steps

Safely Delete a Workspace Directory

Inspect a directory, confirm its type, then recursively delete it.

  1. List the directory contents to capture what will be removed before deleting.
  2. Confirm the path is a DIRECTORY before issuing a recursive delete so a single object is not removed unexpectedly.
  3. Recursively delete the confirmed directory and all of its contents.
What you'll need to have ready
  • token: Databricks personal access token for the Authorization header.
  • directoryPath: Absolute path of the workspace directory to delete.
For your developer

Arazzo workflow microsoft-azure-databricks:delete-workspace-directory, 3 operations: listWorkspaceObjects → getWorkspaceObjectStatus → deleteWorkspaceObject. Specs on APIs.io.