DataStreamReader.
orc
Loads a ORC file stream, returning the result as a DataFrame.
DataFrame
New in version 2.3.0.
For the extra options, refer to Data Source Option in the version you use.
Examples
Load a data stream from a temporary ORC file.
>>> import tempfile >>> import time >>> with tempfile.TemporaryDirectory() as d: ... # Write a temporary ORC file to read it. ... spark.range(10).write.mode("overwrite").format("orc").save(d) ... ... # Start a streaming query to read the ORC file. ... q = spark.readStream.schema("id LONG").orc(d).writeStream.format("console").start() ... time.sleep(3) ... q.stop()