Learn Everything

Paths/Data Engineer/Modeling & Warehousing / Layers & Partitions

Challengeadvancedubuntu:24.04Ask AI

Partition and Cluster Your Tables

Layout is performance. Decide how the fact table is partitioned, how it is clustered and how long the history is kept.

Validator

⏱ 0:00

IDLE — checks run live as you type commands; submit when done

01Requirements

live checks
  • File ~/warehouse/model/partitions.yaml exists○
  • The config states the partition column○
  • The config states the clustering columns○
  • The config states the retention and the file size target○

02Walkthrough

1 of 3 revealed
  1. 01

    Write the layout config

    Partition by the column almost every query filters on - a date column for event tables, an entity key for snapshot tables.

    echo 'table: fact_orders\npartition_by: date_key\ncluster_by: [customer_key, status]\ntarget_file_size_mb: 256\nretention_days: 1095' > ~/warehouse/model/partitions.yaml
  2. 2 locked · each failed submit reveals one

03Stuck?

0 of 3 revealed

Take a hint without losing the lab — each one points at the thing to look at, not at the answer.

04AI Tutor

guides, never solves

Tell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?

04Notebook

saved locally in this browser

learner@lab — ubuntu:24.04

↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list