WriteSupport Contract — "Writable" Data Sources

WriteSupport is the abstraction of "writable" data sources in the Data Source API V2 that can create a DataSourceWriter for writing data out.

WriteSupport defines a single createWriter method that creates an optional DataSourceWriter per SaveMode (and can create no DataSourceWriter when not needed per mode)

Optional<DataSourceWriter> createWriter(
  String writeUUID,
  StructType schema,
  SaveMode mode,
  DataSourceOptions options)

createWriter is used when:

// FIXME: Demo
// df.write.format(...) that is DataSourceV2 and WriteSupport
Note
There are no production implementations of the WriteSupport Contract in Spark SQL yet.

results matching ""

    No results matching ""