
Answer-first summary for fast verification
Answer: The streaming query will continue to run until new data is added to the 'scorecard' table, at which point it will stop.
When a downstream table is dropped while a streaming query is running, the query does not stop immediately. It continues to run until the next batch of data arrives in the upstream table. At that point, the query attempts to read the new data and perform the writeStream operation. Since the downstream table no longer exists, an error message indicating the table or view was not found will be returned. The query does not automatically recreate the dropped table or restore its data. The correct answer highlights that the query's termination is contingent upon the arrival of new data in the upstream table, not the act of dropping the table itself.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
During the execution of a streaming query that loads data from the 'scorecard' table into the 'performance' table in Delta format, the 'performance' table is accidentally dropped by a user. What is the immediate consequence of this action?
A
The streaming query will terminate immediately upon the table being dropped.
B
Upon new data arrival in the 'scorecard' table, the 'performance' table will be recreated, but all previous data will be lost.
C
Upon new data arrival in the 'scorecard' table, the 'performance' table will be recreated with all previous data restored automatically using Delta logs.
D
The streaming query will continue to run until new data is added to the 'scorecard' table, at which point it will stop.
E
It is not possible to drop a table that is currently being used in a streaming query.