CreatableRelationProvider — Data Sources That Save Rows Per Save Mode

A structured query is a DataFrame while the result are Rows.

CreatableRelationProvider is used when:

Table 1. CreatableRelationProviders
CreatableRelationProvider Description



CreatableRelationProvider Contract

package org.apache.spark.sql.sources

trait CreatableRelationProvider {
  def createRelation(
    sqlContext: SQLContext,
    mode: SaveMode,
    parameters: Map[String, String],
    data: DataFrame): BaseRelation
Table 2. CreatableRelationProvider Contract
Method Description


Saves the result of a structured query to a target relation per save mode and parameters. Creates a BaseRelation to describe the scheme.

The save mode specifies what happens when the destination already exists:

  • Append

  • ErrorIfExists

  • Ignore

  • Overwrite

results matching ""

    No results matching ""