org.apache.spark.sql.sources
Interface CreatableRelationProvider


public interface CreatableRelationProvider

Since:
1.3.0

Method Summary
 BaseRelation createRelation(SQLContext sqlContext, SaveMode mode, scala.collection.immutable.Map<String,String> parameters, DataFrame data)
          Creates a relation with the given parameters based on the contents of the given DataFrame.
 

Method Detail

createRelation

BaseRelation createRelation(SQLContext sqlContext,
                            SaveMode mode,
                            scala.collection.immutable.Map<String,String> parameters,
                            DataFrame data)
Creates a relation with the given parameters based on the contents of the given DataFrame. The mode specifies the expected behavior of createRelation when data already exists. Right now, there are three modes, Append, Overwrite, and ErrorIfExists. Append mode means that when saving a DataFrame to a data source, if data already exists, contents of the DataFrame are expected to be appended to existing data. Overwrite mode means that when saving a DataFrame to a data source, if data already exists, existing data is expected to be overwritten by the contents of the DataFrame. ErrorIfExists mode means that when saving a DataFrame to a data source, if data already exists, an exception is expected to be thrown.

Parameters:
sqlContext - (undocumented)
mode - (undocumented)
parameters - (undocumented)
data - (undocumented)
Returns:
(undocumented)
Since:
1.3.0