Hi everyone,
Looking for the right pattern here rather than a workaround.
Setup. DBR 15.4 LTS, Unity Catalog. A silver streaming table reads from a bronze Delta table with a normal streaming read. Bronze is append only in the ordinary course of business, so this has run cleanly for months.
The problem started when we introduced a monthly restatement job. Once a month, a correction process runs an UPDATE against bronze to fix a mis-mapped source code across historical rows. The next time the silver stream runs, it fails with the error about a data update being detected in the source table, and refuses to continue.
Compaction is not the issue. Regular OPTIMIZE runs have never broken this stream, which matches my understanding that compaction commits are marked as not changing data. It is specifically the restatement UPDATE that breaks it.
What I am weighing.
skipChangeCommits would let the stream continue, but it ignores the restated rows entirely, so silver would keep the wrong values forever. That seems worse than failing loudly.
Reading the change data feed instead of the table would let me propagate the corrections properly, but it changes the shape of the downstream logic, and I would need to handle update preimage and postimage records rather than plain appends.
Full refresh of silver after each restatement is the brute force option. It works, but silver is large enough that this is not something I want to do monthly.
Questions.
Is switching to a change data feed read the accepted answer here, or is there a pattern people prefer when corrections are rare and batched?
If I move to a CDF read, is there a clean way to cut over without reprocessing all of history, given silver is already correct up to a known point?
Does anyone restate through a separate correction stream instead, leaving the main append path untouched? That feels cleaner architecturally but I have not seen it written down anywhere.
Thanks.