Hi Faisal, APPLY CHANGES INTO does not support a materialized view as a source, this must be a streaming table.
Ideally, your bronze tables are append-only with the source providing data incrementally. If you do get revisions on previous records in your data, then these should be appended as separate rows into your bronze table which you can then use APPLY CHANGES INTO your silver role to maintain the accurate/most-up-to date version of a record.
For example:
Assume we have already received and ingested values for IDs 1-3, and Source receives changes for these records:
ID,Value
1,Updated_V1
2,Updated_V2
3,Updated_V3
Our Bronze table would look like:
ID,Value,Insert_Ts,...
1,Old_V1,Some_Past_Date,...
2,Old_V2,Some_Past_Date,...
3,Old_V3,Some_Past_Date,...
4,Old_V4,Some_Past_Date,...
1,Updated_V1,Today_Date,...
2,Updated_V2,Today_Date,...
3,Updated_V3,Today_Date,...
You can then use Apply Changes into the Silver table which will yield the below if using SCD 1.
ID,Value,Insert_Ts,...
4,Old_V4,Some_Past_Date,...
1,Updated_V1,Today_Date,...
2,Updated_V2,Today_Date,...
3,Updated_V3,Today_Date,...