internalsGet Pro

Module 18 · Lesson 2 of 13Pro

Partitioning strategy at large scale

Level
Advanced
Topic
Scale, performance and cost
Reading time
20 min

When you finish this page you can

  1. Estimate how many partitions and files a day a partition spec creates, and how large each partition is.
  2. Choose between adding a partition field and adding a sort order for a column that only some queries filter on.
  3. Plan a layout change on a live Iceberg table, knowing which files keep the old layout and how to rewrite them.
  4. Explain why Kafka, Iceberg and Snowflake partition the same clicks by different keys.
  1. Partitioning files by date and key16 min
  2. The small files problem17 min
  3. Partitions and parallelism in Spark17 min

900 files for one phone

On Monday 5 March 2029, the product team at asks for a funnel for one phone, product 48213: how many shoppers viewed it, added it to the cart and ordered it, day by day, over the last 30 days. Kartly is an online store in India that takes about 500,000 orders a day. Its apps send about 200 million click events a day through Kafka into lake.raw.clicks, an Iceberg table in Kartly’s on S3.

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