How can I create a RDD from a SQL query against SQLServer database? Here is the example of dataframe
http://spark.apache.org/docs/latest/sql-programming-guide.html#overview val jdbcDF = sqlContext.read.format("jdbc").options( Map("url" -> "jdbc:postgresql:dbserver", "dbtable" -> "schema.tablename")).load() This code create dataframe from a table. How can I create dataframe from a query, e.g. "select docid, title, docText from dbo.document where docid between 10 and 1000"? Ningjun