|Modifier and Type||Method and Description|
Creates an optional
java.util.Optional<DataSourceWriter> createWriter(String writeUUID, StructType schema, SaveMode mode, DataSourceOptions options)
DataSourceWriterto save the data to this data source. Data sources can return None if there is no writing needed to be done according to the save mode. If this method fails (by throwing an exception), the action will fail and no Spark job will be submitted.
writeUUID- A unique string for the writing job. It's possible that there are many writing jobs running at the same time, and the returned
DataSourceWritercan use this job id to distinguish itself from other jobs.
schema- the schema of the data to be written.
mode- the save mode which determines what to do when the data are already in this data source, please refer to
SaveModefor more details.
options- the options for the returned data source writer, which is an immutable case-insensitive string-to-string map.