Databricks Certified Associate Developer for Apache Spark 3.0 Exam Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Question # 51 Topic 6 Discussion

Databricks Certified Associate Developer for Apache Spark 3.0 Exam Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Question # 51 Topic 6 Discussion

Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Exam Topic 6 Question 51 Discussion:
Question #: 51
Topic #: 6

The code block displayed below contains an error. The code block should read the csv file located at path data/transactions.csv into DataFrame transactionsDf, using the first row as column header

and casting the columns in the most appropriate type. Find the error.

First 3 rows of transactions.csv:

1.transactionId;storeId;productId;name

2.1;23;12;green grass

3.2;35;31;yellow sun

4.3;23;12;green grass

Code block:

transactionsDf = spark.read.load("data/transactions.csv", sep=";", format="csv", header=True)


A.

The DataFrameReader is not accessed correctly.


B.

The transaction is evaluated lazily, so no file will be read.


C.

Spark is unable to understand the file type.


D.

The code block is unable to capture all columns.


E.

The resulting DataFrame will not have the appropriate schema.


Get Premium Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.