diff --git a/CHANGELOG.md b/CHANGELOG.md index be957fc4a..02ce9c491 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +0.61.0 (2024-05-28) +------------------- +- Bump `pymongo`from `3.12.3` to `4.7.3` + 0.60.0 (2024-05-10) ------------------- - Bump `pipelinewise-tap-mysql`from `1.5.6` to `1.6.0` diff --git a/pipelinewise/fastsync/commons/tap_mongodb.py b/pipelinewise/fastsync/commons/tap_mongodb.py index 1a6c951a8..71b98cc23 100644 --- a/pipelinewise/fastsync/commons/tap_mongodb.py +++ b/pipelinewise/fastsync/commons/tap_mongodb.py @@ -139,6 +139,7 @@ def transform_value(value: Any, path) -> Any: datetime.datetime: lambda val, _: class_to_string(val, 'datetime'), bson.decimal128.Decimal128: lambda val, _: val.to_decimal(), bson.regex.Regex: lambda val, _: dict(pattern=val.pattern, flags=val.flags), + bson.binary.Binary: lambda val, _: class_to_string(val, 'bytes'), bson.code.Code: lambda val, _: dict(value=str(val), scope=str(val.scope)) if val.scope else str(val), diff --git a/setup.py b/setup.py index 517ddcbd7..467efd356 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup(name='pipelinewise', python_requires='>=3.7,<3.10', - version='0.60.0', + version='0.60.1', description='PipelineWise', long_description=LONG_DESCRIPTION, long_description_content_type='text/markdown', @@ -33,7 +33,7 @@ 'google-cloud-bigquery==3.11.1', 'pipelinewise-singer-python==1.*', 'python-pidfile==3.0.0', - 'pymongo==3.12.3', + 'pymongo==4.7.3', 'tzlocal>=2.0,<4.1', 'slackclient==2.9.4', 'sqlparse==0.4.4', diff --git a/tests/end_to_end/target_snowflake/tap_mongodb/test_replicate_mongodb_to_sf.py b/tests/end_to_end/target_snowflake/tap_mongodb/test_replicate_mongodb_to_sf.py index 79746d614..c9501ec3a 100644 --- a/tests/end_to_end/target_snowflake/tap_mongodb/test_replicate_mongodb_to_sf.py +++ b/tests/end_to_end/target_snowflake/tap_mongodb/test_replicate_mongodb_to_sf.py @@ -90,17 +90,17 @@ def test_replicate_mongodb_to_sf(self): { 'age': randint(10, 30), 'id': 1001, - 'uuid': uuid.uuid4(), + 'uuid': bson.Binary.from_uuid(uuid.uuid4()), 'ts': bson.Timestamp(12030, 500), }, { 'date': datetime.utcnow(), 'id': 1002, - 'uuid': uuid.uuid4(), + 'uuid': bson.Binary.from_uuid(uuid.uuid4()), 'regex': bson.Regex(r'^[A-Z]\\w\\d{2,6}.*$'), }, { - 'uuid': uuid.uuid4(), + 'uuid': bson.Binary.from_uuid(uuid.uuid4()), 'id': 1003, 'decimal': bson.Decimal128( decimal.Decimal('5.64547548425446546546644') diff --git a/tests/end_to_end/test_target_postgres.py b/tests/end_to_end/test_target_postgres.py index be7e14a3e..73267cb2f 100644 --- a/tests/end_to_end/test_target_postgres.py +++ b/tests/end_to_end/test_target_postgres.py @@ -430,17 +430,17 @@ def assert_row_counts_equal(target_schema, table, count_in_source): { 'age': randint(10, 30), 'id': 1001, - 'uuid': uuid.uuid4(), + 'uuid': bson.Binary.from_uuid(uuid.uuid4()), 'ts': Timestamp(12030, 500), }, { 'date': datetime.utcnow(), 'id': 1002, - 'uuid': uuid.uuid4(), + 'uuid': bson.Binary.from_uuid(uuid.uuid4()), 'regex': bson.Regex(r'^[A-Z]\\w\\d{2,6}.*$'), }, { - 'uuid': uuid.uuid4(), + 'uuid': bson.Binary.from_uuid(uuid.uuid4()), 'id': 1003, 'decimal': bson.Decimal128( decimal.Decimal('5.64547548425446546546644')