Reading Parquet file from Spark

496 Views Asked by At

I use following method to read a Parquet file in Spark

scala> val df = spark.read.parquet("hdfs:/ORDER_INFO")
scala> df.show()

When I show content of DataFrame it displays with encoded language like below

[49 4E 53 5F 32 33]
[49 4E 53 5F 32 30]

In actual scenario these are Strings. Can anyone suggest a method to overcome this issue.

1

There are 1 best solutions below

7
On

Is your input file encoded? Have you tried this, if this works for you?

spark.read.option("encoding","UTF-8").parquet("hdfs:/ORDER_INFO")