PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/TikTok

Design a Warehouse for Key Metrics

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a data engineer's skills in dimensional modeling, data warehousing, and analytics infrastructure, covering facts and dimensions, grain definition, surrogate keys, partitioning and clustering strategies, and operational concerns like deduplication, late-arriving events, null/anonymous users, and slowly changing dimensions.

  • hard
  • TikTok
  • System Design
  • Data Engineer

Design a Warehouse for Key Metrics

Company: TikTok

Role: Data Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

Given an e-commerce marketplace with buyers, sellers, orders, order_items, payments, and page_view events, design a data warehouse model to compute: ( 1) daily session-to-purchase conversion rate, ( 2) average order value, ( 3) 7-day buyer retention by signup cohort, ( 4) cancellation rate by seller, and ( 5) daily GMV by category. Specify the tables you would create (fact and dimension), the grain of each table, key columns (primary/foreign keys), important attributes and data types, partitioning and clustering strategy, and how you would handle late-arriving events, deduplication, null/anonymous users, and slowly changing seller attributes. Justify star vs. snowflake choices and any surrogate keys. No SQL is required.

Quick Answer: This question evaluates a data engineer's skills in dimensional modeling, data warehousing, and analytics infrastructure, covering facts and dimensions, grain definition, surrogate keys, partitioning and clustering strategies, and operational concerns like deduplication, late-arriving events, null/anonymous users, and slowly changing dimensions.

Related Interview Questions

  • Choose tools for scalable distributed systems - TikTok (medium)
  • Design a distributed key-value store - TikTok (medium)
  • Design a content moderation system - TikTok (medium)
  • Design low-latency large-scale hotel booking system - TikTok (medium)
  • Explain SRE architecture and troubleshooting scenarios - TikTok (hard)
TikTok logo
TikTok
Sep 6, 2025, 12:00 AM
Data Engineer
Technical Screen
System Design
1
0

Design a Warehouse Model for Marketplace Analytics

You are designing a warehouse model for an e-commerce marketplace with buyers, sellers, orders, order_items, payments, and page_view events. The goal is to support the following metrics:

  1. Daily session-to-purchase conversion rate
  2. Average order value (AOV)
  3. 7-day buyer retention by signup cohort
  4. Cancellation rate by seller
  5. Daily GMV by category

Provide a dimensional model proposal that specifies:

  • Fact and dimension tables
  • The grain of each table
  • Key columns (primary and foreign keys)
  • Important attributes and data types
  • Partitioning and clustering strategy
  • Handling of late-arriving events, deduplication, null/anonymous users, and slowly changing seller attributes
  • Justification for star vs. snowflake choices and use of surrogate keys

No SQL is required.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More TikTok•More Data Engineer•TikTok Data Engineer•TikTok System Design•Data Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.