exam questions

Exam DP-420 All Questions

View all questions & answers for the DP-420 exam

Exam DP-420 topic 3 question 12 discussion

Actual exam question from Microsoft's DP-420
Question #: 12
Topic #: 3
[All DP-420 Questions]

HOTSPOT -
You have an Apache Spark pool in Azure Synapse Analytics that runs the following Python code in a notebook.

For each of the following statements. select Yes if the statement is true. Otherwise. select No.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: No -
Streaming ג€" Append Output Mode is an outputMode in which only the new rows in the streaming DataFrame/Dataset will be written to the sink.
This is the default mode. Use append as output mode outputMode("append") when you want to output only new rows to the output sink.
Note:
Streaming ג€" Complete Output Mode is an OutputMode in which all the rows in the streaming DataFrame/Dataset will be written to the sink every time there are some updates.
Streaming ג€" Update Output Mode is an outputMode in which only the rows that were updated in the streaming DataFrame/Dataset will be written to the sink every time there are some updates.

Box 2: No -
Structured Streaming is a scalable and fault-tolerant stream processing engine built on the Spark SQL engine. You can express your streaming computation the same way you would express a batch computation on static data. The Spark SQL engine will take care of running it incrementally and continuously and updating the final result as streaming data continues to arrive.

Box 3: Yes -
Synapse Apache Spark also allows you to ingest data into Azure Cosmos DB. It is important to note that data is always ingested into Azure Cosmos DB containers through the transactional store. When Synapse Link is enabled, any new inserts, updates, and deletes are then automatically synced to the analytical store.
Reference:
https://sparkbyexamples.com/spark/spark-streaming-outputmode/ https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html https://docs.microsoft.com/en-us/azure/synapse-analytics/synapse-link/how-to-query-analytical-store-spark

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
maxequiel
Highly Voted 1 year, 3 months ago
Answer N: Append mode activate, updates won't be recorded. N: Streaming N: It doesn't need
upvoted 6 times
...
azuredemo2022three
Highly Voted 1 year, 5 months ago
Answer YNN
upvoted 5 times
...
b890yc
Most Recent 1 year, 2 months ago
Yes - New and updated orders will be added to contoso-erp.orders - The format is cosmos.oltp.changeFeed which will process all inserts and updates. No - The code performs bulk data ingestion from contoso-app - It is not bulk data ingestion rather it is change feed. No - Both contoso-app and contoso-erp have Analytical store enabled - The format is cosmos.oltp which will write into the original container (not into the lease container) so it is not required to enable Analytical store on the container
upvoted 1 times
...
Garyn
1 year, 2 months ago
Please update the answer. Right answer is below Answer N: Append mode activate, updates won't be recorded. N: Streaming N: It doesn't need
upvoted 1 times
...
Nath2
2 years, 1 month ago
And Question 1 is "Yes" - as this is reading from the change feed and so gets all the inserts and updates.
upvoted 5 times
xRiot007
11 months ago
Correct, but this is not what the bullet point is asking. It says that updates and inserts are added to orders, which is FALSE. The stream is reading inserts and updates for contoso-app. It only adds the inserts for contoso-erp, due to mode Append. Reading data from a stream does not guarantee it will processed in any way, shape or form.
upvoted 2 times
...
Bharat
1 year, 10 months ago
Since the append mode is enabled, updates will not be recorded, only new records are added so your answer is partially right/wrong. I would go with 'No' for Question 1.
upvoted 4 times
...
...
Nath2
2 years, 1 month ago
This is linked to this documentation: https://learn.microsoft.com/en-us/azure/synapse-analytics/synapse-link/how-to-query-analytical-store-spark-3#load-streaming-dataframe-from-azure-cosmos-db-container And so doesn't need the analytical store to be enabled, so "No" for the third question.
upvoted 3 times
Bharat
1 year, 10 months ago
I agree. For the third question, it should be a "No"
upvoted 2 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 ...