Monday, February 18, 2019

How will archival records jive with schema changes.

Let's say we are making some reports daily with ETL snapshots from elsewhere. The daily records are stored in a history and we want to be able to rerun reports not just from the immediate day but also from a prior point in time. Well, after our app is all set up and working and everything is fine, the day will come when we need schema changes right? How do we not sabotage the archives in changing the schema? When we need to delete a column... Well, we would probably never delete a column. We would just stop reporting on it. New column? Make it null at old records? When a value is null, how can we know if it was null to begin with or null due to after the fact changes? A coworker suggested you have to have a second new column for every column added (and I'd imagine you would also want a column for the ignored pseudodropped columns too) that decried whether or not there was a modification, perhaps a nulls allowed bit type column that was either null or true.

No comments:

Post a Comment