Skip to main content

databricks-workspace-cleaner

dwc is a tool to clear run cells from notebooks, for example where there might be concern about data held in run cells, or as preparation for commit to source control.

You can also use it to import/export multiple notebooks with this capability, in use cases where dbc export may not be possible due to volume limits.

Commands

Command Sub-Command Parameters Description
list notebooks List all notebooks in workspace.
list libraries List all libraries in workspace.
export notebooks path: location to output zip of notebooks Exports all notebooks from a workspace as base64 source code. The process will remove annotations for run cells
import notebooks path: location of notebooks.zip
import_prefix: folder to import into (default: IMPORT)
Import notebooks into workspace.
clean folders Delete all empty folders in workspace.
clean notebooks Remove annotations for run cells from all notebooks in workspace.

Installation

In a python 3.7 environment install this repository, e.g:
pip install git+https://github.com/frogrammer/fire-commands.git
The tool can be installed to an azure cloud shell.

Databricks Workspace Login

The dwc CLI is built using the databricks CLI sdk https://github.com/databricks/databricks-cli, and uses its authentication mechanism to login to a workspace.
To login to an azure databricks workspace using a user token:

echo MY_TOKEN >> token.txt
databricks configure --host MY_HOST -f token.txt
rm token.txt 

Metadata

Release files for databricks-workspace-cleaner 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for databricks-workspace-cleaner 0.1.0
File Size Uploaded
databricks-workspace-cleaner-0.1.0.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for databricks-workspace-cleaner 0.1.0
File Interpreter ABI Platform
databricks_workspace_cleaner-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.9 kB

Release files / databricks-workspace-cleaner-0.1.0.tar.gz

Download URL databricks-workspace-cleaner-0.1.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
971416ff7b25352058ac82298cbd209c104dcffafa53a4a4ff9b95a4342b1e29
BLAKE2b-256 checksum
How to use checksums
3ef5089cd747a551b85cc21a2b935a99db9d7b5b9f1d369a4db3ed129d3331b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.1

Release files / databricks_workspace_cleaner-0.1.0-py3-none-any.whl

Download URL databricks_workspace_cleaner-0.1.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28b806b67cc69c70579f89a5307d19b0b3f0105d6708db2fe34dabb7cf13a886
BLAKE2b-256 checksum
How to use checksums
b191625c552705d6489728fe48214b0df14b8538e57582d8780575703b30a063
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.1

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page