Question 9

Domain 1: Developing Code for Data Processing using Python and SQL

A structured streaming job writes to Delta through `foreachBatch`. The job may be restarted after failures, and duplicate output must be avoided. Which design is best?