Courseiva
Design and implement data storagemediumMultiple ChoiceObjective-mapped

Optimal Partition Strategy for Azure Data Lake Storage Gen2

A company is designing a data lake in Azure Data Lake Storage Gen2 (ADLS Gen2) to store IoT sensor data from millions of devices. The data is ingested in Parquet format, partitioned by date and device ID. The analytics team frequently queries the last 30 days of data for specific device types. Which partition strategy minimizes query cost and optimizes performance?

Quick Answer

The key idea here is that partition order should mirror the order in which your queries actually filter data, with the most commonly and most selectively used predicate placed at the top of the folder hierarchy. Because the analytics team's most frequent pattern is querying the last 30 days for specific device types, putting date first means every query naturally prunes down to a small slice of the data lake before it even considers device type; the engine can skip every folder outside that 30-day window entirely, which is partition elimination in action, and it dramatically reduces both the volume of data scanned and the cost of scanning it. Nesting device type as a subfolder within each date then lets a query narrow further within that already-small set of days. If the partitioning were reversed, device type first and then date, a date-range query would have to reach into every device-type folder to find the relevant days, losing most of the pruning benefit. The general lesson is to look at which filter appears in the majority of real queries and put that dimension first in the partition hierarchy; the predicate that queries use most consistently and that eliminates the most data should always sit at the top of a partitioning scheme.

⚠ Common exam trap

It's easy for candidates to assume partitioning by the most granular attribute (device ID) first will provide the best performance, but they overlook that query patterns typically filter by time range, making date the most effective first-level partition for cost and performance optimization.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Partition by date (yyyy/MM/dd) first, then by device type (e.g., sensor_type=temp).

Partitioning by date first enables efficient partition pruning for the common query pattern (last 30 days), and then by device type further filters the data within those date partitions. In ADLS Gen2, queries using partition elimination skip entire directories, reducing the amount of data scanned and minimizing query cost. This strategy aligns with the typical query workload, where date-range filtering is the most selective predicate.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Partition by device ID first, then by date.

    Why it's wrong here

    Queries for the last 30 days would need to scan all device partitions, then filter dates.

  • Partition by device ID only, with a separate directory for each device.

    Why it's wrong here

    Queries filtering by date would scan all device partitions, increasing cost.

  • Partition by date (yyyy/MM/dd) first, then by device type (e.g., sensor_type=temp).

    Why this is correct

    This allows date pruning first, then efficient filtering by device type within each day.

  • Partition by device type only, with a directory for each type.

    Why it's wrong here

    Queries filtering by date would scan all type partitions for recent data.

About these practice questions

Courseiva writes every DP-203 question from scratch — 760 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on DP-203

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is designing a data lake solution on Azure Data Lake Storage Gen2. Data will be ingested from IoT devices at high frequency (every 5 seconds). Each device sends a JSON payload of 2 KB. The data must be stored in a hierarchical namespace and partitioned by date and device ID to optimize query performance. Which partition strategy should be used?

medium
  • A.Use Azure SQL Database with clustered columnstore index on date and device ID.
  • B.Organize folders as /YYYY/MM/DD/DeviceID/ in ADLS Gen2 and use file naming that includes timestamp.
  • C.Use Azure Table Storage with PartitionKey set to date and RowKey set to device ID.
  • D.Use Azure Cosmos DB with partition key on (date, device ID) and TTL for data retention.

Why B: ADLS Gen2 with a hierarchical namespace allows folder-based partitioning by date and device ID (e.g., /YYYY/MM/DD/DeviceID/), which directly maps to the query optimization requirement. This structure enables efficient partition pruning for time-range and device-specific queries, and the high-frequency 2 KB JSON payloads are well-suited for append-friendly file naming with timestamps.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DP-203 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-203 exam.