Skip to main content
CodeOath

Data engineering · Chapter 2

Files, formats and schemas

About this chapter

Once data outgrows a spreadsheet, the file format decides how fast it can be read and how safely it can change. This chapter writes one courier scan table as CSV, JSON Lines and Parquet and compares them: row against column storage, read times, what is inside a Parquet file, the trade in compression, what a schema is, how a changed schema fails, and how to name and place files in object storage.

Who it is for: Aspiring data engineers who have queried a file once and now need to decide how data should be stored for repeated analysis.

You will be able to

  • Explain the difference between row-oriented and column-oriented storage and which questions each answers faster.
  • Describe what a Parquet file contains and why its footer matters.
  • Weigh smaller files against the time spent writing and reading them.
  • Say what a schema is and what happens when a column is added, renamed or given a new type.
  • Choose one format for raw landing files and another for files read many times.

The key idea: A file format is a promise about structure. CSV promises almost nothing, so every reader guesses. A format that carries its schema lets a change fail loudly instead of quietly producing wrong numbers.

In this chapter

  1. Where chapter 1 left Tidewell
  2. Rows and columns on disk
  3. The same table in five files
  4. How fast can it be read
  5. Inside a Parquet file
  6. Compression is a trade, not a rule
  7. Types, and what a schema is
  8. When the schema changes
  9. Semi-structured data and when to impose a schema
  10. Where files live and how they are named
  11. Choosing a format
  12. Mistakes that recur

Locked: needs a plan

You can read chapter 1 free. Chapter 2 is the next one.

What you can do now, free: re-read chapter 1 and try its problems.

What a plan gives you: all chapters of the track you pick and their checks. Professional, one role is ₹329 a month or ₹2,299 a year. It renews until you cancel, and you can cancel any time. Paid plans open at launch.

Why is this locked?

Chapter 1 of every track is free, so you can see how the track reads. The rest of a track and its checks come with a plan, or open as you pass each chapter's check.

The price is for one period, a month or a year. A plan renews until you cancel.

Back to the track