Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam DP-600 All Questions

View all questions & answers for the DP-600 exam

Exam DP-600 topic 1 question 112 discussion

Actual exam question from Microsoft's DP-600
Question #: 112
Topic #: 1
[All DP-600 Questions]

HOTSPOT
-

You have a Fabric workspace that uses the default Spark starter pool and runtime version 1.2.

You plan to read a CSV file named Sales_raw.csv in a lakehouse, select columns, and save the data as a Delta table to the managed area of the lakehouse. Sales_raw.csv contains 12 columns.

You have the following code.



For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Mike5611
Highly Voted 1 month, 2 weeks ago
1. YES - The .select() function in the code specifies the exact columns ('SalesOrderNumber', 'OrderDate', 'CustomerName', and 'UnitPrice') to be selected. Therefore, only these columns will be read from the CSV. 2. NO - The withColumn("Year", year("OrderDate")) function adds a new column called "Year" by extracting the year from the "OrderDate" column. However, it does not replace the "OrderDate" column—it only adds the new "Year" column. 3. YES - The inferSchema='true' tells Spark to infer the data types of each column in the CSV, which requires an extra scan of the data to determine these types. This can indeed increase execution time.
upvoted 5 times
...
mghf61
Most Recent 4 days, 12 hours ago
No, No, Yes The spark reads all columns first before selection , so spark.read , read all columns
upvoted 1 times
...
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.

SaveCancel
Loading ...