Skip to content

Initial Release of sqlnbfmt v0.1.0

Choose a tag to compare

@flyersworder flyersworder released this 26 Oct 18:51
· 81 commits to main since this release

sqlnbfmt v0.1.0 - Initial Release

We're excited to announce sqlnbfmt v0.1.0, a formatting tool that automatically formats SQL code within Jupyter Notebooks. This tool helps maintain clean, consistent SQL code in both standard code cells and magic cells.

Key Features

  • Formats SQL queries in both standard code cells and magic cells (%%sql)
  • Uses AST parsing for precise SQL identification and formatting
  • Preserves query placeholders (%s, ?) in parameterized queries
  • Supports custom configuration via config.yaml
  • Maintains SQL comments during formatting

Installation

pip install sqlnbfmt

Usage

Format a notebook by running:

sqlnbfmt path/to/your_notebook.ipynb

For detailed usage instructions, visit our GitHub repository.

Known Limitations

  • Some complex placeholder scenarios may not be formatted correctly
  • Partial support for dialect-specific SQL syntax

Contributing

We welcome contributions!

Acknowledgments

  • Built with sqlglot for SQL parsing
  • Thanks to our early testers and contributors