Spark Stream: Read from Files
Getting Started
Create Spark Session
# Create the Spark Session
from pyspark.sql import SparkSession
spark = (
SparkSession
.builder
.appName("Streaming Process Files")
.config("spark.streaming.stopGracefullyOnShutdown", True)
.master("local[*]")
.getOrCreate()
)