java.lang.UnsupportedOperationException: MongoCollection already exists

Google Groups | Ammar Shadiq | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    MongoDB Spark Unable to Insert data to existing collection.

    Google Groups | 6 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