Class MongoDbConnector

java.lang.Object
com.leumanuel.woozydata.repository.MongoDbConnector

public class MongoDbConnector extends Object
Connector class for MongoDB operations. Provides methods for reading data from MongoDB collections into DataFrames.
Version:
1.0
Author:
Leu A. Manuel
  • Constructor Details

    • MongoDbConnector

      public MongoDbConnector(MongoConfig mongoConfig)
      Creates a new MongoDB connector with specified configuration.
      Parameters:
      mongoConfig - MongoDB configuration
  • Method Details

    • readCollection

      public DataFrame readCollection(String collectionName)
      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.