Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Returns a DataStreamReader that can be used to read data streams as a streaming DataFrame.
Syntax
readStream
Returns
DataStreamReader
Examples
import time
# Use Rate source that generates rows continuously, apply modulo by 3,
# then write the stream to the console. The streaming query stops in 3 seconds.
df = spark.readStream.format("rate").load()
df = df.selectExpr("value % 3 as v")
q = df.writeStream.format("console").start()
time.sleep(3)
q.stop()