Skip to content

About

A simple formatting script for databricks notebooks to jupyter notebooks and back.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

dbsnotebook-fmt

A simple formatting script for databricks notebooks to jupyter notebooks and back using the jupytext package.

Software requirements

The following python packages should be installed to use the script:

  • argparse
  • jupytext

The code was implemented and tested using python version 3.12

Usage

The script converts python files (must end in .py to work) which are formatted as databricks notebooks to jupyter notebooks and vice-versa. The script is simply a wrapper around jupytext which makes it work for databricks notebooks. The file to format can simply be added as a positional argument:

python parse_dbnotebook.py your_databricks_notebook.py

This will create a corresponding jupyter notebook with the filename your_databricks_notebook.ipynb in the current working directory. Alternatively, an output filepath can be provided using the --output or -o option. The same command works with passing an .ipynb file as argument, which results in a corresponding .py file to be stored in the current working directory.

About

A simple formatting script for databricks notebooks to jupyter notebooks and back.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages