source
#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\trancare_dw\test\in_csv") df.writeStream.format(source="console").outputMode("append").start().awaitTermination()