Interface SupportsOverwrite
- All Superinterfaces:
SupportsOverwriteV2,SupportsTruncate,WriteBuilder
Overwriting data by filter will delete any data that matches the filter and replace it with data that is committed in the write.
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanOverwrite(Predicate[] predicates) Checks whether it is possible to overwrite data from a data source table that matches filter expressions.default booleancanOverwrite(Filter[] filters) Checks whether it is possible to overwrite data from a data source table that matches filter expressions.default WriteBuilderConfigures a write to replace data matching the filters with data committed in the write.Configures a write to replace data matching the filters with data committed in the write.default WriteBuildertruncate()Configures a write to replace all existing data with data committed in the write.Methods inherited from interface org.apache.spark.sql.connector.write.WriteBuilder
build, buildForBatch, buildForStreaming
-
Method Details
-
canOverwrite
Checks whether it is possible to overwrite data from a data source table that matches filter expressions.Rows should be overwritten from the data source iff all of the filter expressions match. That is, the expressions must be interpreted as a set of filters that are ANDed together.
- Parameters:
filters- V2 filter expressions, used to match data to overwrite- Returns:
- true if the delete operation can be performed
- Since:
- 3.4.0
-
overwrite
Configures a write to replace data matching the filters with data committed in the write.Rows must be deleted from the data source if and only if all of the filters match. That is, filters must be interpreted as ANDed together.
- Parameters:
filters- filters used to match data to overwrite- Returns:
- this write builder for method chaining
-
canOverwrite
Description copied from interface:SupportsOverwriteV2Checks whether it is possible to overwrite data from a data source table that matches filter expressions.Rows should be overwritten from the data source iff all of the filter expressions match. That is, the expressions must be interpreted as a set of filters that are ANDed together.
- Specified by:
canOverwritein interfaceSupportsOverwriteV2- Parameters:
predicates- V2 filter expressions, used to match data to overwrite- Returns:
- true if the delete operation can be performed
-
overwrite
Description copied from interface:SupportsOverwriteV2Configures a write to replace data matching the filters with data committed in the write.Rows must be deleted from the data source if and only if all of the filters match. That is, filters must be interpreted as ANDed together.
- Specified by:
overwritein interfaceSupportsOverwriteV2- Parameters:
predicates- filters used to match data to overwrite- Returns:
- this write builder for method chaining
-
truncate
Description copied from interface:SupportsTruncateConfigures a write to replace all existing data with data committed in the write.- Specified by:
truncatein interfaceSupportsOverwriteV2- Specified by:
truncatein interfaceSupportsTruncate- Returns:
- this write builder for method chaining
-