QuestionQ160

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

The code block below must read a Parquet file at the path filePath into a DataFrame. Select the response that correctly completes the numbered blanks in the code block to accomplish this task.

Code block:

__1__.__2__.__3__(__4__)  
Explanation

SparkSession.read provides a DataFrameReader, and DataFrameReader.load(path) reads data from the supplied path. The load method defaults its input format to parquet, so spark.read.load(filePath) reads the Parquet data into a DataFrame.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!