java.lang.UnsupportedOperationException: MongoCollection already exists

Google Groups | Ammar Shadiq | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    MongoDB Spark Unable to Insert data to existing collection.

    Google Groups | 8 months ago | Ammar Shadiq
    java.lang.UnsupportedOperationException: MongoCollection already exists

    Root Cause Analysis

    1. java.lang.UnsupportedOperationException

      MongoCollection already exists

      at com.mongodb.spark.sql.DefaultSource.createRelation()
    2. com.mongodb.spark
      DefaultSource.createRelation
      1. com.mongodb.spark.sql.DefaultSource.createRelation(DefaultSource.scala:99)
      2. com.mongodb.spark.sql.DefaultSource.createRelation(DefaultSource.scala:38)
      2 frames
    3. org.apache.spark
      ResolvedDataSource$.apply
      1. org.apache.spark.sql.execution.datasources.ResolvedDataSource$.apply(ResolvedDataSource.scala:222)
      1 frame
    4. Spark Project SQL
      DataFrameWriter.save
      1. org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:148)
      1 frame