read local file in scala spark code example Example: pyspark to read file from windows file system rdd = sc.textFile("file:///path/to/file")