Azure – CONTEXT_ONLY_VALID_ON_DRIVER It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transform.. SPARK-5063
I would like to process the data 24/7 using databricks structured streaming. But before I process all the data I need to apply some transformations on it. therefore I am using foreach. Below is my def from pyspark.sql import DataFrame,…