diff --git a/CHANGES.md b/CHANGES.md index ffb46c8b..79382c76 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ ## Unreleased +- MongoDB: Configure `MongoDBCrateDBConverter` after updating to commons-codec 0.0.18 ## 2024/09/22 v0.0.25 - Table Loader: Improved conditional handling of "transformation" parameter diff --git a/cratedb_toolkit/io/mongodb/copy.py b/cratedb_toolkit/io/mongodb/copy.py index febfbe4b..27ce6bac 100644 --- a/cratedb_toolkit/io/mongodb/copy.py +++ b/cratedb_toolkit/io/mongodb/copy.py @@ -57,9 +57,14 @@ def __init__( ) try: transformation = tm.project.get(address=address) + logger.info(f"Applying transformation to: {address}") except KeyError: - pass - self.converter = MongoDBCrateDBConverter(transformation=transformation) + logger.warning(f"No transformation found for: {address}") + self.converter = MongoDBCrateDBConverter( + timestamp_to_epoch=True, + timestamp_use_milliseconds=True, + transformation=transformation, + ) self.translator = MongoDBFullLoadTranslator(table_name=self.cratedb_table, converter=self.converter) self.on_error = on_error diff --git a/pyproject.toml b/pyproject.toml index 58705ed6..fc1bdb08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -167,7 +167,7 @@ kinesis = [ "lorrystream[carabas]>=0.0.6", ] mongodb = [ - "commons-codec[mongodb,zyp]>=0.0.17", + "commons-codec[mongodb,zyp]>=0.0.18", "cratedb-toolkit[io]", "orjson<4,>=3.3.1", "pymongo<5,>=3.10.1",