Exam Certified Associate Developer for Apache Spark All QuestionsBrowse all questions from this exam
Question 81

The code block shown below contains an error. The code block is intended to print the schema of DataFrame storesDF. Identify the error.

Code block:

storesDF.printSchema.getAs[String]

    Correct Answer: D

    The printSchema member of DataFrame is an operation that prints the schema directly, so there is no need to call getAs. The correct way to print the schema of a DataFrame in this context is by using storesDF.printSchema().

Discussion
azure_bimonsterOption: D

storesDF.printSchema() would be enough in this case

cookiemonster42Option: D

question is formulated poorly, but most possibly it's D