How do I create a DataSet from a parquet?

Viewed 2930

I have the following code to read data from a parquet to Dataframe

DataFrame addressDF = sqlContext.read().parquet(addressParquetPath);

How do i read data from parquet to DATA SET?

Dataset dataset = sqlContext.createDataset(sqlContext.read().parquet(propertyParquetPath).toJavaRDD(), Encoder.);

What should the Encoder parameter contain? Also, Do i have to create a property class and then pass that or how is it?

1 Answers
Related