Create an RDD that executes a SQL query on a JDBC connection and reads results.
Create an RDD that executes a SQL query on a JDBC connection and reads results. Each row is
converted into a Object
array. For usage example, see test case JavaAPISuite.testJavaJdbcRDD.
a factory that returns an open Connection. The RDD takes care of closing the connection.
the text of the query. The query must contain two ? placeholders for parameters used to partition the results. E.g. "select title, author from books where ? <= id and id <= ?"
the minimum value of the first placeholder
the maximum value of the second placeholder The lower and upper bounds are inclusive.
the number of partitions. Given a lowerBound of 1, an upperBound of 20, and a numPartitions of 2, the query would be executed twice, once with (1, 10) and once with (11, 20)
Create an RDD that executes a SQL query on a JDBC connection and reads results.
Create an RDD that executes a SQL query on a JDBC connection and reads results. For usage example, see test case JavaAPISuite.testJavaJdbcRDD.
a factory that returns an open Connection. The RDD takes care of closing the connection.
the text of the query. The query must contain two ? placeholders for parameters used to partition the results. E.g. "select title, author from books where ? <= id and id <= ?"
the minimum value of the first placeholder
the maximum value of the second placeholder The lower and upper bounds are inclusive.
the number of partitions. Given a lowerBound of 1, an upperBound of 20, and a numPartitions of 2, the query would be executed twice, once with (1, 10) and once with (11, 20)
a function from a ResultSet to a single row of the desired result type(s). This should only call getInt, getString, etc; the RDD takes care of calling next. The default maps a ResultSet to an array of Object.