internalsGet Pro

Module 04 · Lesson 4 of 10Pro

Avro and Protobuf: schemas for events

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

When you finish this page you can

  1. Explain why events in motion use a row-oriented binary format while analytics files use Parquet.
  2. Trace how Avro and Protobuf encode one click event, and say where each keeps the field names and types.
  3. Write an Avro container file in Python and query it with DuckDB.
  4. Choose between Avro and Protobuf for a pipeline’s events, and say what would change the choice.

Builds on 3 lessons

Start with lesson 113 min
  1. Row and columnar storage: why layout matters13 min
  2. Parquet: columnar files for analytics17 min
  3. Reading and writing CSV, JSON and Parquet in Python14 min

Every click event spells out its field names

is an online store in India. Today its app writes each click as a row in PostgreSQL, and Meera, Kartly’s data engineer, loads about 10 million of them a night for reports and for the ML team. From Module 06 that changes: about 200 million click events a day will flow through Kafka, one message per click, as they happen.

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