Class/Object

com.mongodb.spark

MongoSpark

Related Docs: object MongoSpark | package spark

Permalink

case class MongoSpark(sparkSession: SparkSession, connector: MongoConnector, readConfig: ReadConfig, pipeline: Seq[BsonDocument]) extends Product with Serializable

The MongoSpark class

Note: Creation of the class should be via MongoSpark$.builder.

Since

1.0

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MongoSpark
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MongoSpark(sparkSession: SparkSession, connector: MongoConnector, readConfig: ReadConfig, pipeline: Seq[BsonDocument])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val connector: MongoConnector

    Permalink
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  13. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. val pipeline: Seq[BsonDocument]

    Permalink
  15. val readConfig: ReadConfig

    Permalink
  16. val sparkSession: SparkSession

    Permalink
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toDF(schema: StructType): DataFrame

    Permalink

    Creates a DataFrame based on the provided schema.

    Creates a DataFrame based on the provided schema.

    schema

    the schema representing the DataFrame.

    returns

    a DataFrame.

  19. def toDF[T](beanClass: Class[T]): DataFrame

    Permalink

    Creates a DataFrame based on the schema derived from the bean class.

    Creates a DataFrame based on the schema derived from the bean class.

    Note: Prefer toDS[T](beanClass:Class[T])* as computations will be more efficient.

    T

    The bean class type to shape the data from MongoDB into

    beanClass

    encapsulating the data from MongoDB

    returns

    a DataFrame

  20. def toDF[T <: Product]()(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): DataFrame

    Permalink

    Creates a DataFrame based on the schema derived from the optional type.

    Creates a DataFrame based on the schema derived from the optional type.

    Note: Prefer toDS[T<:Product]()* as computations will be more efficient. The rdd must contain an _id for MongoDB versions < 3.2.

    T

    The optional type of the data from MongoDB, if not provided the schema will be inferred from the collection

    returns

    a DataFrame

  21. def toDS[T](beanClass: Class[T]): Dataset[T]

    Permalink

    Creates a Dataset from the RDD strongly typed to the provided java bean.

    Creates a Dataset from the RDD strongly typed to the provided java bean.

    T

    The type of the data from MongoDB

  22. def toDS[T <: Product]()(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T], arg1: NotNothing[T]): Dataset[T]

    Permalink

    Creates a Dataset from the collection strongly typed to the provided case class.

    Creates a Dataset from the collection strongly typed to the provided case class.

    T

    The type of the data from MongoDB

  23. def toJavaRDD[D](clazz: Class[D]): JavaMongoRDD[D]

    Permalink

    Creates a JavaRDD for the collection

    Creates a JavaRDD for the collection

    D

    the type of the data in the RDD

    clazz

    the class of the data contained in the RDD

    returns

    the javaRDD

  24. def toJavaRDD(): JavaMongoRDD[Document]

    Permalink

    Creates a JavaRDD for the collection

    Creates a JavaRDD for the collection

    returns

    a JavaMongoRDD[Document]

  25. def toRDD[D]()(implicit arg0: ClassTag[D], e: DefaultsTo[D, Document]): MongoRDD[D]

    Permalink

    Creates a RDD for the collection

    Creates a RDD for the collection

    D

    the datatype for the collection

    returns

    a MongoRDD[D]

  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped