v0.9.0
Breaking changes
Refactored setup_oracle_client
The setup_oracle_client
script has been overhauled and the internal logic has been simplified. Externally facing changes are:
- The Instant Client zip file is downloaded from the Oracle servers by default (previously it was only accessible to logged in users)
- The script writes a file that can run with the
source
command to add the drivers to LD_LIBRARY_PATH - The client can now be installed and configured in one line:
source $(setup_oracle_client)
- The
--zip_location
allows an alternative location (URL or file path) to be specified for the drivers - The
--reinstall
flag allows reinstallation of an existing install - The
-v
flag gives verbose output of install progress
Note that in Dockerfiles, it is still necessary to manually set the LD_LIBRARY_PATH using the ENV
command.
rowfactory -> row_factory
namedtuple_rowfactory
and dict_rowfactory
have been replaced with namedtuple_row_factory
and dict_row_factory
. This makes etlhelper
consistent with row_factory
in other Python modules e.g. sqlite3
in the standard library.
executemany parameter order changed
The syntax for executemany has been changed from executemany(query, rows, conn)
to executemany(query, conn, rows)
. This is consistent with the other ETL functions where query
and conn
are together.
Non-breaking changes
- Update README. New text brings intended use cases and simple example closer to the top.
- DbParams class gets
MY_DB.connect()
syntax for creating databases. - Add
paramstyle
attribute to DbHelper class. This allows the required paramstyle to be displayed in error messages, giving users a clue if a syntax error is because they used%s
instead of:1
as a placeholder for parameter values. - Add integration tests for MS SQL Server databases. These run internally on the BGS CI system.
- The PostgreSQL DbHelper now catches
InterfaceError
andInternalError
(thanks @rwolniak)