Interview practice question
Schema changed across Parquet files
Data Engineering · Spark · Intermediate
Older Parquet files have 20 columns and newer ones have 22. When reading the whole folder, the new columns are missing or the read fails. How do you handle it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Spark uses the schema from one file by default.
- mergeSchema option merges schemas across files, but it's slower.
- Better to use Delta or Iceberg, which track schema evolution.
- Or provide an explicit schema that includes new columns.
- Type conflicts need explicit handling.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.