#CSV
mySchema = StructType().add("id", IntegerType(), True).add("name",StringType(),True) df = spark.readStream.option("sep",",").option("header","false").schema(mySchema).csv(r"D:myAPP rancare_dw estin_csv") df.writeStream.format(source="console").outputMode("append").start().awaitTermination()