v0.6.0
- Added method to dashboards to get dashboard url (#211). In this release, we have added a new method
get_urlto thelakeview_dashboardsobject in thelaksedashboardlibrary. This method utilizes the Databricks SDK to retrieve the dashboard URL, simplifying the code and making it more maintainable. Previously, the dashboard URL was constructed by concatenating the host and dashboard ID, but this new method ensures that the URL is obtained correctly, even if the format changes in the future. Additionally, a new unit test has been added for a method that gets the dashboard URL using the workspace client. This new functionality allows users to easily retrieve the URL for a dashboard using its ID and the workspace client. - Extend replace database in query (#210). This commit extends the database replacement functionality in the
DashboardMetadataclass, allowing users to specify which database and catalog to replace. The enhancement includes support for catalog replacement and a newreplace_databasemethod in theDashboardMetadataclass, which replaces the catalog and/or database in the query based on provided parameters. These changes enhance the flexibility and customization of the database replacement feature in queries, making it easier for users to control how their data is displayed in the dashboard. Thecreate_dashboardfunction has also been updated to use the new method for replacing the database and catalog. Additionally, theTileMetadataupdate method has been replaced with a new merge method, and theQueryTileandTileclasses have new properties and methods for handling content, width, height, and position. The commit also includes several unit tests to ensure the new functionality works as expected. - Improve object oriented dashboard-as-code implementation (#208). In this release, the object-oriented implementation of the dashboard-as-code feature has been significantly improved, addressing previous pull request comments (#201). The
TileMetadatadataclass now includes methods for updating and comparing tile metadata, and theDashboardMetadataclass has been removed and its functionality incorporated into theDashboardsclass. TheDashboardsclass now generates tiles, datasets, and layouts for dashboards using the providedquery_transformer. The code's readability and maintainability have been further enhanced by replacing the use of thecopymodule withdataclasses.replacefor creating object copies. Additionally, updates have been made to the unit tests for dashboard functionality in the project, with new methods and attributes added to check for valid dashboard metadata and handle duplicate query or widget IDs, as well as to specify the order in which tiles and widgets should be displayed in the dashboard.
Contributors: @JCZuurmond