Hi all!

I am trying to read records from offset 100 to 110 from a table using
following piece of code

val sc = new SparkContext(new
SparkConf().setAppName("SparkJdbcDs").setMaster("local[*]"))
    val sqlContext = new SQLContext(sc)
    val options = new HashMap[String, String]()
    options.put("driver", "com.mysql.jdbc.Driver")
    options.put("url",
"jdbc:mysql://*******:3306/temp?user=****&password=****")
    options.put("dbtable", "tempTable")
    options.put("lowerBound", "100")
    options.put("upperBound", "110")
    options.put("numPartitions", "1")
    sqlContext.load("jdbc", options)


but this returns all the records instead of only 10 records




--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/lower-and-upper-offset-not-working-in-spark-with-mysql-database-tp23635.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to