diff --git a/CHANGELOG.md b/CHANGELOG.md index ce0035f1..a60fd29e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Version changelog +## 0.7.3 + +* Added publish flag to `Dashboards.create_dashboard` ([#233](https://github.com/databrickslabs/lsql/issues/233)). In this release, we have added a `publish` flag to the `Dashboards.create_dashboard` method, allowing users to publish the dashboard upon creation, thereby resolving issue [#219](https://github.com/databrickslabs/lsql/issues/219). This flag is included in the `labs.yml` file with a description of its functionality. Additionally, the `no-open` flag's description has been updated to specify that it prevents the dashboard from opening in the browser after creation. The `create_dashboard` function in the `cli.py` and `dashboards.py` files has been updated to include the new `publish` flag, allowing for more flexibility in how users create and manage their dashboards. The `Dashboards.create_dashboard` method now calls the `WorkspaceClient.lakeview.publish` method when the `publish` flag is set to `True`, which publishes the created dashboard. This behavior is covered in the updated tests for the method. +* Fixed boolean cli flags ([#235](https://github.com/databrickslabs/lsql/issues/235)). In this release, we have improved the handling of command-line interface (CLI) flags in the `databricks labs` command. Specifically, we have addressed the limitation that pure boolean flags are not supported. Now, when using boolean flags, the user will be prompted to confirm with a `y` or 'yes'. We have modified the `create_dashboard` command to accept string inputs for the `publish` and `no_open` flags, which are then converted to boolean values for internal use. Additionally, we have introduced a new `open-browser` command, which will open the dashboard in the browser after creating when set to `y` or 'yes'. These changes have been tested manually to ensure correct behavior. This improvement provides a more flexible input experience and better handling of boolean flags in the CLI command for software engineers using the open-source library. +* Fixed format breaks widget ([#238](https://github.com/databrickslabs/lsql/issues/238)). In this release, we've made significant changes to the 'databricks/labs/lsql' directory's 'dashboards.py' file to address formatting breaks in the widget that could occur with Call to Action (CTA) presence in a query. These changes include the addition of new class variables, including _SQL_DIALECT and _DIALECT, and their integration into existing methods such as _parse_header, validate, format, _get_abstract_syntax_tree, and replace_catalog_and_database_in_query. Furthermore, we have developed new methods for creating and deleting schemas and getting the current test purge time. We have also implemented new integration tests to demonstrate the fix for the formatting issue and added new test cases for the query handler's header-splitting functionality, query formatting, and CTE handling. These enhancements improve the library's handling of SQL queries and query tiles in the context of dashboard creation, ensuring proper parsing, formatting, and metadata extraction for a wide range of query scenarios. +* Fixed replace database when catalog or database is None ([#237](https://github.com/databrickslabs/lsql/issues/237)). In this release, we have addressed an issue where system tables disappeared in ucx dashboards when replacing the placeholder database. To rectify this, we have developed a new method, `replace_catalog_and_database_in_query`, in the `dashboards.py` file's `replace_database` function. This method checks if the catalog or database in a query match the ones to be replaced and replaces them with new ones, ensuring that system tables are not lost during the replacement process. Additionally, we have introduced new unit tests in `test_dashboards.py` to verify that queries are correctly transformed when replacing the database or catalog in the query. These tests include various scenarios, using two parametrized test functions, to ensure the correct functioning of the feature. This change provides a more robust and reliable dashboard display when replacing the placeholder database in the system. + + ## 0.7.2 * Fixed dashboard deployment/creation ([#230](https://github.com/databrickslabs/lsql/issues/230)). The recent changes to our open-source library address issues related to dashboard deployment and creation, enhancing their reliability and consistency. The `deploy_dashboard` function has been deprecated in favor of the more accurate `create_dashboard` function, which now includes a `publish` flag. A `validate` method has been added to the `Tile`, `MarkdownTile`, and `QueryTile` classes to raise an error if the dashboard is invalid. The `test_dashboards.py` file has been updated to reflect these changes. These enhancements address issues [#222](https://github.com/databrickslabs/lsql/issues/222), [#229](https://github.com/databrickslabs/lsql/issues/229), and partially resolve [#220](https://github.com/databrickslabs/lsql/issues/220). The commit includes an image of a dashboard created through the deprecated `deploy_dashboard` method. These improvements ensure better dashboard creation, validation, and deployment, while also maintaining backward compatibility through the deprecation of `deploy_dashboard`. diff --git a/src/databricks/labs/lsql/__about__.py b/src/databricks/labs/lsql/__about__.py index bc8c296f..4910b9ec 100644 --- a/src/databricks/labs/lsql/__about__.py +++ b/src/databricks/labs/lsql/__about__.py @@ -1 +1 @@ -__version__ = "0.7.2" +__version__ = "0.7.3"