Loading section...
How Do You Track History?
Concepts: paScdPipeline
A MERGE statement overwrites the target row with the latest values. The interviewer will ask: "But what if you need to know what the values were last week?" Overwriting destroys history. This is the SCD question, and your answer needs to be specific enough to prove you have implemented one. Vague hand-waving about "keeping old versions" is a red flag. SCD Type 2 in Pipelines SCD Type 2 keeps every version of a row. When a customer changes their address, you don't update the existing row - you close it (set valid_to to the current timestamp) and insert a new row with the new address and valid_from set to now. The result is a complete audit trail. The interviewer wants to hear you describe this mechanically, not abstractly. Walk through the MERGE logic step by step. The customer_hash column