WriteToDataSourceV2 Logical Operator — Writing Data to DataSourceV2
WriteToDataSourceV2
is a logical operator that represents writing data to a DataSourceV2 data source in the Data Source API V2.
Note
|
WriteToDataSourceV2 is deprecated for AppendData logical operator since Spark SQL 2.4.0.
|
WriteToDataSourceV2
is created when:
-
DataFrameWriter
is requested to save a DataFrame to a data source (that is a DataSourceV2 data source with WriteSupport) -
Spark Structured Streaming’s
MicroBatchExecution
is requested to run a streaming batch (with a streaming sink withStreamWriteSupport
)
WriteToDataSourceV2
takes the following to be created:
-
Child logical plan
When requested for the child operators, WriteToDataSourceV2
gives the one child logical plan.
When requested for the output attributes, WriteToDataSourceV2
gives no attributes (an empty collection).
WriteToDataSourceV2
is planned (translated) to a WriteToDataSourceV2Exec physical operator (when DataSourceV2Strategy execution planning strategy is requested to plan a logical query).