v0.7.0
- Added
databricks labs lsql fmtcommand (#221). The commit introduces a new command,databricks labs lsql fmt, to the open-source library, which formats SQL files in a given folder using the Databricks SDK. This command can be used without authentication and accepts afolderflag, which specifies the directory containing SQL files to format. The change also updates the labs.yml file and includes a new method,format, in theQueryTileclass, which formats SQL queries using thesqlglotlibrary. This commit enhances the functionality of the CLI for SQL file formatting and improves the readability and consistency of SQL files, making it easier for developers to understand and maintain the code. Additionally, the commit includes changes to various SQL files to demonstrate the improved formatting, such as converting SQL keywords to uppercase, adding appropriate spacing around keywords and operators, and aligning column names in theVALUESclause. The purpose of this change is to ensure that the formatting method works correctly and does not introduce any issues in the existing functionality.
Contributors: @nfx