v0.3.0
- Added support for
save_table(..., mode="overwrite")
toStatementExecutionBackend
(#74). In this release, we've added support for overwriting a table when saving data using thesave_table
method in theStatementExecutionBackend
. Previously, attempting to use theoverwrite
mode would raise aNotImplementedError
. Now, when this mode is specified, the method first truncates the table before inserting the new rows. The truncation is done using theexecute
method to run aTRUNCATE TABLE
SQL command. Additionally, we've added a new integration test,test_overwrite
, to thetest_deployment.py
file to verify the newoverwrite
mode functionality. A new option,mode="overwrite"
, has been added to thesave_table
method, allowing for the existing data in the table to be deleted and replaced with the new data being written. We've also added two new test cases,test_statement_execution_backend_save_table_overwrite_empty_table
andtest_mock_backend_overwrite
, to verify the new functionality. It's important to note that the method signature has been updated to include a default value for themode
parameter, setting it toappend
by default. This change does not affect the functionality and only provides a more convenient default behavior for users of the method.
Contributors: @william-conti