Tool to manage notebooks and clean output cells.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file databricks-workspace-cleaner-0.1.0.tar.gz
.
File metadata
- Download URL: databricks-workspace-cleaner-0.1.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 971416ff7b25352058ac82298cbd209c104dcffafa53a4a4ff9b95a4342b1e29 |
|
MD5 | a77d87ff14c5d49b1794a96180958408 |
|
BLAKE2b-256 | 3ef5089cd747a551b85cc21a2b935a99db9d7b5b9f1d369a4db3ed129d3331b9 |
File details
Details for the file databricks_workspace_cleaner-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: databricks_workspace_cleaner-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28b806b67cc69c70579f89a5307d19b0b3f0105d6708db2fe34dabb7cf13a886 |
|
MD5 | c4a7196dd9b6acef144e16c46900bb8b |
|
BLAKE2b-256 | b191625c552705d6489728fe48214b0df14b8538e57582d8780575703b30a063 |