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.
To me E is most likely correct
Syntax: spark.read.load(filePath)
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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
1 week, 4 days ago5effea7
6 months, 4 weeks agoSowwy1
10 months agoazure_bimonster
12 months ago