internalsGet Pro

Module 04 · Lesson 8 of 10Pro

Schema evolution: changing data without breaking jobs

Level
Intermediate
Topic
Data formats and file storage
Reading time
18 min

When you finish this page you can

  1. Predict what DuckDB returns when it reads Parquet files whose columns differ, with and without union_by_name.
  2. Classify adding, removing, renaming and retyping a field as backward or forward compatible.
  3. Apply Avro’s rules for resolving a writer’s schema against a reader’s, including defaults and aliases.
  4. Plan a rename that no reader notices, by adding the new field before removing the old one.
  1. Semi-structured data: querying JSON in SQL17 min
  2. Parquet: columnar files for analytics17 min
  3. Avro and Protobuf: schemas for events17 min

The column is in last night’s file, and DuckDB can’t find it

is an online store in India. Every night, Meera, its data engineer, exports about 10 million click events from the store’s database to a file, exports/clicks_<night>.parquet. Thirteen months of them, 395 files, are queried with by the product and ML teams.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan