exam questions

Exam DP-700 All Questions

View all questions & answers for the DP-700 exam

Exam DP-700 topic 2 question 31 discussion

Actual exam question from Microsoft's DP-700
Question #: 31
Topic #: 2
[All DP-700 Questions]

HOTSPOT
-

You have a table in a Fabric lakehouse that contains the following data.



You have a notebook that contains the following code segment.



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 (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
13d2a97
Highly Voted 2 months, 2 weeks ago
Yes No No
upvoted 11 times
Sr18
1 month, 1 week ago
Why 3rd No: It will get the first occurrence of order date as year, but not for each year but for first occurrence of year, customer name and username.
upvoted 3 times
...
...
Biju1
Highly Voted 2 months, 3 weeks ago
YES,NO,NO .
upvoted 7 times
...
Berlow
Most Recent 2 weeks ago
Yes No Yes Line-by-line Breakdown: Handle missing or empty customerName values: Replaces null or empty customerName values with "Unknown". Extract domain from Email into a new column Username: Splits the Email at "@" and takes the domain part (after the @). Remove duplicate orderDate values and select specific columns: Drops duplicate rows based on orderDate. Selects orderDate, the year extracted from orderDate, customerName, and Username.
upvoted 1 times
...
smanzana
2 weeks, 2 days ago
Yes No No
upvoted 1 times
...
Rajib
3 weeks ago
Why third is no>It shoud be yes
upvoted 2 times
...
DarioReymago
4 weeks ago
-Yes -No: .getItem use a Index it start with 0 https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.Column.getItem.html -No: This apply deduplicate over shortDate and show year. I can see more then 1 row for the same year
upvoted 3 times
...
PBridge
1 month, 1 week ago
Yes, Yes, Yes--checked with chatgpt
upvoted 1 times
vernillen
1 month ago
Most things in programming start at 0, so if it selects item 1, it's the second part. So YNY
upvoted 3 times
...
...
zxc01
2 months, 3 weeks ago
Yes, No, No
upvoted 6 times
...
5e89616
2 months, 3 weeks ago
Correct Line2: df = df.withColumn("Username", split(col("Email"), "@").getItem(1)) returns the SECOND part of the string, after the "@"
upvoted 6 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 ...