关注 spark技术分享,
撸spark源码 玩spark最佳实践

SchemaRelationProvider Contract — Relation Providers With Mandatory User-Defined Schema

SchemaRelationProvider Contract — Relation Providers With Mandatory User-Defined Schema

The requirement of specifying a user-defined schema is enforced when DataSource is requested for a BaseRelation for a given data source format. If not specified, DataSource throws a AnalysisException:

Table 1. SchemaRelationProvider Contract
Method Description

createRelation

Creates a BaseRelation for the user-defined schema

Used exclusively when DataSource is requested for a BaseRelation for a given data source format

Note
There are no known direct implementation of PrunedFilteredScan Contract in Spark SQL.
Tip
Use RelationProvider for data source providers with schema inference.
Tip
Use both SchemaRelationProvider and RelationProvider if a data source should support both schema inference and user-defined schemas.
赞(0) 打赏
未经允许不得转载:spark技术分享 » SchemaRelationProvider Contract — Relation Providers With Mandatory User-Defined Schema
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏