Class MongoDbUtils

java.lang.Object
org.apache.beam.sdk.io.mongodb.MongoDbUtils

public class MongoDbUtils extends Object
Utility methods for MongoDB IO.
  • Constructor Details

    • MongoDbUtils

      public MongoDbUtils()
  • Method Details

    • toDocument

      public static Document toDocument(Row row)
      Converts a Beam Row to a BSON Document.
    • toRow

      public static Row toRow(Map<?,?> doc, Schema schema)
      Converts a BSON Document (or any Map representing fields) to a Beam Row matching the given Schema.