pyspark.sql.DataFrame.isStreaming¶
-
property
DataFrame.isStreaming¶ Returns
Trueif thisDataFramecontains one or more sources that continuously return data as it arrives. ADataFramethat reads data from a streaming source must be executed as aStreamingQueryusing thestart()method inDataStreamWriter. Methods that return a single answer, (e.g.,count()orcollect()) will throw anAnalysisExceptionwhen there is a streaming source present.New in version 2.0.0.
Changed in version 3.4.0: Supports Spark Connect.
- Returns
- bool
Whether it’s streaming DataFrame or not.
Notes
This API is evolving.
Examples
>>> df = spark.readStream.format("rate").load() >>> df.isStreaming True