diff --git a/CHANGELOG.md b/CHANGELOG.md index 75766154b..941c847c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ -## 0.12.3-dev2 +## 0.12.3-dev3 ### Enhancements +* **Driver for MongoDB connector.** Adds a driver with `unstructured` version information to the + MongoDB connector. + ### Features * **Add Databricks Volumes destination connector** Databricks Volumes connector added to ingest CLI. Users may now use `unstructured-ingest` to write partitioned data to a Databricks Volumes storage service. diff --git a/unstructured/__version__.py b/unstructured/__version__.py index 71ce44637..e62434f7c 100644 --- a/unstructured/__version__.py +++ b/unstructured/__version__.py @@ -1 +1 @@ -__version__ = "0.12.3-dev2" # pragma: no cover +__version__ = "0.12.3-dev3" # pragma: no cover diff --git a/unstructured/ingest/connector/mongodb.py b/unstructured/ingest/connector/mongodb.py index 36b9599e3..e29ecf621 100644 --- a/unstructured/ingest/connector/mongodb.py +++ b/unstructured/ingest/connector/mongodb.py @@ -5,6 +5,7 @@ from pathlib import Path from dataclasses_json.core import Json +from unstructured.__version__ import __version__ as unstructured_version from unstructured.ingest.enhanced_dataclass.core import _asdict from unstructured.ingest.error import DestinationConnectionError, SourceConnectionError, WriteError from unstructured.ingest.interfaces import ( @@ -93,10 +94,15 @@ class SimpleMongoDBConfig(BaseConnectorConfig): @requires_dependencies(["pymongo"], extras="mongodb") def generate_client(self) -> "MongoClient": from pymongo import MongoClient + from pymongo.driver_info import DriverInfo from pymongo.server_api import ServerApi if self.uri: - return MongoClient(self.uri, server_api=ServerApi(version=SERVER_API_VERSION)) + return MongoClient( + self.uri, + server_api=ServerApi(version=SERVER_API_VERSION), + driver=DriverInfo(name="unstructured", version=unstructured_version), + ) else: return MongoClient( host=self.host,