The code block shown below should read a parquet at the file path filePath into a DataFrame. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.
The correct answer is:
E. 1. spark 2. read 3. load 4. filePath
Explanation:
spark.read: This creates a DataFrameReader object for reading data.
load(): This method is used to load data from a file, and when the file is in Parquet format, it can automatically infer the format without explicitly specifying it.
It's E. read is a property of spark, not a method, so that makes the choice C or E. In C the parameter source is being assigned "parquet". Parquet is the format. So C is wrong. E is correct, because the default format is parquet.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Souvik_79
3 months, 1 week ago5effea7
9 months, 3 weeks agoSowwy1
1 year agoazure_bimonster
1 year, 2 months ago