UpperBound: Max value used for selecting stride (Max value of partitionColumn in DB)
LowerBound: Min value used for selecting stride (Min value of partitionColumn in DB)
numPartitions: Decides the number of partitions create. It also is the number of parallel connects that are going to be made to the Database
partitionColumn: Integer, Timestamp column to be used to partitioning data
Partition Stride: It is the min amount of data that is at least going to be present in each of the partitions.
Stride = (UpperBound - LowerBound) / numPartitions
JDBC in Spark SQL – Beginner’s Hadoop
NOTE
.option("dbtable", "(select * from policy where plan ='childplan') as policy")
: Filter data from DB- In place of “dbtable” option “query” can be used but then partitioning of data is not supported