From the course: Data Ingestion with Python

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Schema changes

Schema changes - Python Tutorial

From the course: Data Ingestion with Python

Start my 1-month free trial

Schema changes

- Over time, your data will change. And with it, your schema will change. Changes can come from organic change, say a new piece of information, such as Twitter handle for user. Some comes from redesign of data, say you have a complex address record instead of street and house number. When we look at schema changes, we often split them into two categories. Breaking, and nonbreaking. Nonbreaking changes mean that the old fields are still there and you can access them as usual. It usually means adding a new field, say a GitHub handle. However you need to think about what to do with the old data. Can you add new data? What are the default values for the old data? How do I handle missing data? Breaking changes mean that old data doesn't fit anymore. It's usually a removal or rename of a field. These changes are harder to implement and require more planning. You should have a plan on how to make schema changes, since they will happen. Write your code in a way that can handle missing fields,…

Contents