Package org.apache.spark.sql
Enum Class SaveMode
- All Implemented Interfaces:
- Serializable,- Comparable<SaveMode>,- Constable
SaveMode is used to specify the expected behavior of saving a DataFrame to a data source.
- Since:
- 1.3.0
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionAppend mode means that when saving a DataFrame to a data source, if data/table already exists, contents of the DataFrame are expected to be appended to existing data.ErrorIfExists mode means that when saving a DataFrame to a data source, if data already exists, an exception is expected to be thrown.Ignore mode means that when saving a DataFrame to a data source, if data already exists, the save operation is expected to not save the contents of the DataFrame and to not change the existing data.Overwrite mode means that when saving a DataFrame to a data source, if data/table already exists, existing data is expected to be overwritten by the contents of the DataFrame.
- 
Method SummaryMethods inherited from class java.lang.EnumcompareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
- 
Enum Constant Details- 
AppendAppend mode means that when saving a DataFrame to a data source, if data/table already exists, contents of the DataFrame are expected to be appended to existing data.- Since:
- 1.3.0
 
- 
OverwriteOverwrite mode means that when saving a DataFrame to a data source, if data/table already exists, existing data is expected to be overwritten by the contents of the DataFrame.- Since:
- 1.3.0
 
- 
ErrorIfExistsErrorIfExists mode means that when saving a DataFrame to a data source, if data already exists, an exception is expected to be thrown.- Since:
- 1.3.0
 
- 
IgnoreIgnore mode means that when saving a DataFrame to a data source, if data already exists, the save operation is expected to not save the contents of the DataFrame and to not change the existing data.- Since:
- 1.3.0
 
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
 
-