Class MongoDbConnector
java.lang.Object
com.leumanuel.woozydata.repository.MongoDbConnector
Connector class for MongoDB operations.
Provides methods for reading data from MongoDB collections into DataFrames.
- Version:
- 1.0
- Author:
- Leu A. Manuel
-
Constructor Summary
ConstructorsConstructorDescriptionMongoDbConnector(MongoConfig mongoConfig) Creates a new MongoDB connector with specified configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the MongoDB connection.readCollection(String collectionName) Reads a MongoDB collection into a DataFrame.
-
Constructor Details
-
MongoDbConnector
Creates a new MongoDB connector with specified configuration.- Parameters:
mongoConfig- MongoDB configuration
-
-
Method Details
-
readCollection
Reads a MongoDB collection into a DataFrame.- Parameters:
collectionName- Name of the collection to read- Returns:
- DataFrame containing collection data
-
close
public void close()Closes the MongoDB connection. Should be called when the connector is no longer needed.
-