exam questions

Exam DP-203 All Questions

View all questions & answers for the DP-203 exam

Exam DP-203 topic 2 question 68 discussion

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

You are planning a streaming data solution that will use Azure Databricks. The solution will stream sales transaction data from an online store. The solution has the following specifications:
The output data will contain items purchased, quantity, line total sales amount, and line total tax amount.

✑ Line total sales amount and line total tax amount will be aggregated in Databricks.
✑ Sales transactions will never be updated. Instead, new rows will be added to adjust a sale.
You need to recommend an output mode for the dataset that will be processed by using Structured Streaming. The solution must minimize duplicate data.
What should you recommend?

  • A. Update
  • B. Complete
  • C. Append
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
[Removed]
Highly Voted 2 years, 5 months ago
Selected Answer: C
Using chatgpt : Append
upvoted 18 times
...
necktru
Highly Voted 3 years, 2 months ago
Selected Answer: A
I think Update is correct, because " new rows will be added to adjust a sale" , that means that in the course of a day you must update de daily import with the new sales, the group by process generates new amounts, keep in mind that when it say "sales transactions will never be updated" its about the online store, not the aggregated rows.
upvoted 18 times
vctrhugo
2 years ago
Sales transactions will never be updated. Instead, new rows will be added to adjust a sale.
upvoted 8 times
...
...
Danweo
Most Recent 11 months, 3 weeks ago
Selected Answer: C
We need to append new entries only, the question describes updates that are not done on existing row entries, but by adding new rows of duplicate transactions
upvoted 1 times
...
ageorgieva
1 year ago
Selected Answer: C
append...
upvoted 1 times
...
Dusica
1 year, 2 months ago
Pay attention to the "adjust" word. That is like in double entry accounting. Lines are added positive or negative, then queries are used to produce final numeric value (aggregating). It is C
upvoted 4 times
jpgsa11
1 year, 1 month ago
Exacly
upvoted 1 times
...
...
Alongi
1 year, 2 months ago
Selected Answer: A
It's Update
upvoted 1 times
...
ExamKiller42
1 year, 4 months ago
Selected Answer: A
I think 'A. Update' is correct. From what I understand, "Sales transactions will never be updated. Instead, new rows will be added to adjust a sale." means that the input stream will have new rows reflecting the corrected sales transaction. If we use "append" output mode we will have duplicates in the target table, corresponding to both the original transaction as well as the new corrected transaction. Instead, we can use the forEachBatch method and "update" output mode to merge each microBatch to the target table, updating old transactions if they match or inserting new ones if they don't. This would minimize duplicate data as well as allow for line sales amount and tax amount to be aggregated correctly in the target table.
upvoted 2 times
ExamKiller42
1 year, 4 months ago
https://docs.databricks.com/en/structured-streaming/delta-lake.html#upsert-from-streaming-queries-using-foreachbatch
upvoted 1 times
...
...
Azure_2023
1 year, 4 months ago
Selected Answer: C
Append: This mode adds new rows to the output sink for each received event. It's perfect for your scenario where sales transactions are never updated but adjusted by adding new rows. This guarantees no duplicate data due to updates, minimizing duplicates. Update: This mode updates existing rows in the output sink if a matching key is found. Since you mentioned no updates occur, using this mode would lead to unnecessary operations and potential inconsistencies. Complete: This mode writes the entire dataset to the output sink for each micro-batch interval. This is unnecessary and inefficient for your scenario since only new rows need to be added, and it potentially duplicates data across micro-batches.
upvoted 4 times
...
j888
1 year, 5 months ago
Append. The update does not add the new rows
upvoted 1 times
...
jsav1
1 year, 6 months ago
Selected Answer: C
Append: you are only adding new rows and existing rows do not need to be updated
upvoted 1 times
...
dakku987
1 year, 6 months ago
Selected Answer: C
when you see new rows will be added to APPEND is always the answers
upvoted 1 times
...
d046bc0
1 year, 6 months ago
Selected Answer: A
(ChatGPT) The Append output mode is used when new rows are added to the result table. This mode is suitable for scenarios where the output table is a summary of the input data, and the input data is not updated
upvoted 1 times
...
dawoodiee
1 year, 9 months ago
Sales transactions will NEVER be updated. Append.
upvoted 1 times
...
[Removed]
1 year, 9 months ago
Selected Answer: A
Update
upvoted 1 times
...
EliteAllen
1 year, 9 months ago
Selected Answer: C
C. Append This mode is used when you are always adding new records to the output data. Given that sales transactions will never be updated and new rows will be added to adjust a sale, this mode seems to be the most suitable. It will also help in minimizing duplicate data since it only adds new records and does not modify existing ones.
upvoted 1 times
...
kkk5566
1 year, 9 months ago
Selected Answer: A
A is correct
upvoted 1 times
kkk5566
1 year, 9 months ago
ignore it
upvoted 2 times
...
...
Tightbot
1 year, 10 months ago
Selected Answer: C
Append is the right choice . Update is for modifications and append is to add new rows
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 ...