JDBCRelation([table]) [numPartitions=[number]]
JDBCRelation
JDBCRelation
is a BaseRelation and InsertableRelation with support for PrunedFilteredScan.
JDBCRelation
is created when:
-
DataFrameReader
is requested to load data from external table using JDBC (withpredicates
forWHERE
clause per partition) -
JdbcRelationProvider
creates a BaseRelation
JDBCRelation
presents itself with the name of the table and the number of partitions (if given).
Figure 1. JDBCRelation in web UI (Details for Query)
scala> df.explain
== Physical Plan ==
*Scan JDBCRelation(projects) [numPartitions=1] [id#0,name#1,website#2] ReadSchema: struct<id:int,name:string,website:string>
JDBCRelation as BaseRelation
JDBCRelation
is a BaseRelation which represents a collection of tuples with a schema.
Method | Description |
---|---|
Disabled (i.e. |
|
StructType |
|
SQLContext from SparkSession |
|
JDBCRelation as PrunedFilteredScan
JDBCRelation
is a PrunedFilteredScan
.
Method | Description |
---|---|
JDBCRelation as InsertableRelation
JDBCRelation
is a InsertableRelation
.
Method | Description |
---|---|
columnPartition
Method
Caution
|
FIXME Is this still in use? |