Databricks-DA-Assoc Analyzing Queries Practice Question
A data analyst runs a query against a large Delta table partitioned by date. The query filters on a timestamp column rather than the date partition column. How does Databricks handle this query execution?
⚠ Common exam trap
Candidates assume the query optimizer can automatically derive partition pruning from any datetime attribute, missing that filters must target the exact partition column.
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
✓
The query optimizer performs a full scan of all partitions because partition pruning requires filters on the exact partition columns.
Databricks performs partition pruning based on the partition columns defined in the table metadata. When filtering on a timestamp column that differs from the partition column, the query engine cannot prune partitions effectively, resulting in a full table scan of all files unless liquid clustering or secondary indexing is applied. This optimization is critical for maintaining high query performance on large datasets.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The query automatically re-partitions the Delta table on the fly to match the timestamp filter.
Why it's wrong here
Delta Lake never rewrites partitioning during query execution; partition layout is fixed at write time. Automatic re-partitioning is tempting because Databricks does optimise layouts, but that happens through OPTIMIZE or liquid clustering, not on the fly in response to a filter predicate.
- ✗
The engine evaluates the timestamp column to prune partitions directly mapped to timestamps.
Why it's wrong here
Partition pruning requires a predicate on the partition column itself; a timestamp column has no direct mapping to date partitions, so the engine scans all partitions. Direct pruning is tempting because pruning is the desired behaviour, but it only triggers on the actual partition key.
- ✓
The query optimizer performs a full scan of all partitions because partition pruning requires filters on the exact partition columns.
Why this is correct
Partition pruning is strictly tied to the columns specified in the PARTITIONED BY clause. Without a direct equality or range filter on those specific partition columns, the query engine must scan every file in the storage directory.
- ✗
Databricks converts the timestamp into the partition column format and successfully prunes partitions.
Why it's wrong here
Databricks does not implicitly cast a timestamp filter into the date partition format to enable pruning; without an explicit predicate on the partition column, no file skipping occurs. The conversion idea is tempting because partition pruning is the goal, but the engine cannot infer that mapping automatically.
About these practice questions
This Databricks-DA-Assoc question is part of Courseiva's 291-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Databricks exam blueprint
This Databricks-DA-Assoc practice question is part of Courseiva's free Databricks 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 Databricks-DA-Assoc exam.