DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-0 practice question 22 of 25
Which of the following code blocks reads all CSV files in directory filePath into a single DataFrame, with column names defined in the CSV file…
Choose your answer, then check it against the explanation.
Which of the following code blocks reads all CSV files in directory filePath into a single DataFrame,
with column names defined in the CSV file headers?
Content of directory filePath:
1.
_SUCCESS
2.
_committed_2754546451699747124
3.
_started_2754546451699747124
4.
part-00000-tid-2754546451699747124-10eb85bf-8d91-4dd0-b60b-2f3c02eeecaa-298-1-
part-00000-tid-2754546451699747124-10eb85bf-8d91-4dd0-b60b-2f3c02eeecaa-298-1-
c000.csv.gz
5.
part-00001-tid-2754546451699747124-10eb85bf-8d91-4dd0-b60b-2f3c02eeecaa-299-1-
part-00001-tid-2754546451699747124-10eb85bf-8d91-4dd0-b60b-2f3c02eeecaa-299-1-
c000.csv.gz
6.
part-00002-tid-2754546451699747124-10eb85bf-8d91-4dd0-b60b-2f3c02eeecaa-300-1-
part-00002-tid-2754546451699747124-10eb85bf-8d91-4dd0-b60b-2f3c02eeecaa-300-1-
c000.csv.gz
7.
part-00003-tid-2754546451699747124-10eb85bf-8d91-4dd0-b60b-2f3c02eeecaa-301-1-
part-00003-tid-2754546451699747124-10eb85bf-8d91-4dd0-b60b-2f3c02eeecaa-301-1-
c000.csv.gz
spark.option("header",True).csv(filePath)
Question 22 of 25
Keep practicing
Take the free DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-0 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-0 practice questions
- Question 1The code block displayed below contains an error. The code block is intended to perform a…
- Question 2Which of the following code blocks shows the structure of a DataFrame in a tree-like way,…
- Question 3Which of the following code blocks reads the parquet file stored at filePath into DataFra…
- Question 4Which of the following code blocks returns a 2-column DataFrame that shows the distinct v…
- Question 5The code block shown below should return an exact copy of DataFrame transactionsDf that d…
- Question 6The code block displayed below contains an error. The code block should configure Spark t…
