pyspark.sql.streaming.DataStreamReader.name#

DataStreamReader.name(source_name)[source]#

Specifies a name for the streaming source.

This name is used to identify the source in checkpoint metadata and enables stable checkpoint locations for source evolution.

New in version 4.2.0.

Parameters
source_namestr

the name to assign to this streaming source. Must contain only ASCII letters, digits, and underscores.

Returns
DataStreamReader

Notes

This API is experimental.

Examples

>>> spark.readStream.format("rate").name("my_source")  
<...streaming.readwriter.DataStreamReader object ...>