File Utilities#

This module provides utilities to download, upload, and delete files and directories from Databricks volumes.

The file operations are performed in the following stages:

  1. Initialization: - Instantiate WorkspaceClient and prepare paths.

  2. Operation: - For download/upload/delete, handle single items or recurse through directories.

  3. Completion: - Print progress messages and finalize the operation.

Note

  • Environment variables DATABRICKS_TOKEN and DATABRICKS_HOST must be set.

Important

  • Deletes are irreversible; use with caution.

Functions#

download_from_databricks

Download content from a Databricks volume to a local directory.

upload_to_databricks

Upload a local file or directory to a Databricks volume.

delete_from_databricks

Delete a file or directory from a Databricks volume.

Standalone Execution#

This module is not intended to be executed as a standalone script.