I'm trying to read something from a Database table using JDBC:
val df = spark.read.jdbc("<database url>", "<some table name>", <some DbProperties>)
and then write it to another database:
df.write.mode(SaveMode.Append).jdbc("<other database url>", "<same table name>", <some DbProperties>)
- If we do not specify numPartitionsoption in the Db Properties, what will be the default value fornumPartitionsSpark uses to read the table from Database intodf?
- If I want to write the above dfinto another table of another database, if I still don't specifynumPartitions, will there be parallel connections created while writing to the Database?
- Suppose while reading I have given numPartitionsas 8, while writing thisdfonto the target DB, will thenumPartitions = 8still be valid without me explicitly specifying it while writing?
 
    