v0.10.0
- Added Functionality to export any dashboards-as-code into CSV (#269). The
DashboardMetadata
class now includes a new method,export_to_zipped_csv
, which enables exporting any dashboard as CSV files in a ZIP archive. This method acceptssql_backend
andexport_path
as parameters and exports dashboard queries to CSV files in the specified ZIP archive by iterating through tiles and fetching dashboard queries if the tile is a query. To ensure the proper functioning of this feature, unit tests and manual testing have been conducted. A new test,test_dashboards_export_to_zipped_csv
, has been added to verify the correct export of dashboard data to a CSV file. - Added support for generic types in
SqlBackend
(#272). In this release, we've added support for using rich dataclasses, including those with optional and generic types, in theSqlBackend
of theStatementExecutionBackend
class. The new functionality is demonstrated in thetest_supports_complex_types
unit test, which creates aNested
dataclass containing various complex data types, such as nested dataclasses,datetime
objects,dict
,list
, and optional fields. This enhancement is achieved by updating thesave_table
method to handle the conversion of complex dataclasses to SQL statements. To facilitate type inference, we've introduced a newStructInference
class that converts Python dataclasses and built-in types to their corresponding SQL Data Definition Language (DDL) representations. This addition simplifies data definition and manipulation operations while maintaining type safety and compatibility with various SQL data types.
Contributors: @jgarciaf106, @nfx