pyspark.sql.datasource.DataSource.writer#

DataSource.writer(schema, overwrite)[source]#

Returns a DataSourceWriter instance for writing data.

The implementation is required for writable data sources.

Parameters
schemaStructType

The schema of the data to be written.

overwritebool

A flag indicating whether to overwrite existing data when writing to the data source.

Returns
writerDataSourceWriter

A writer instance for this data source.