
Databricks Certified Data Engineer - Professional
Get started today
Ultimate access to all questions.
When a streaming query is initiated without specifying an output mode, and the target table already contains records, what happens?
When a streaming query is initiated without specifying an output mode, and the target table already contains records, what happens?
Real Exam
Explanation:
In Spark streaming queries, the output mode can be specified using .outputMode()
. There are three types of output modes supported: Complete Mode (replaces the entire table), Append Mode (adds only new records), and Update Mode (updates only changed rows). If the output mode is not specified, the query does not fail; instead, Append mode is auto-selected as the default. This ensures that only new records are added to the target table without altering existing data.