Databricks Data Engineer Professional · Section 5 · 15% of the exam
Compare Liquid Clustering vs partitioning/ZORDER for a given table size and query pattern.
One of the objectives of the Databricks Certified Data Engineer Professional exam, in the section “Cost & Performance Optimization”. Here is what it covers, the points to remember and a question to try.
What it covers
Compare Hive-style partitioning, ZORDER, liquid clustering with explicit keys and CLUSTER BY AUTO for a given table size and query pattern, and decide when deletion vectors pay off for updates, deletes and concurrent writers.
Points to remember
- Data skipping uses per-file min/max statistics; the layout decides how many files a filter can skip.
- Partitioning: low-cardinality columns with at least 1 GB per partition; don't partition under 1 TB; use liquid clustering from 1 to 100 TB.
- Z-order:
OPTIMIZE ... ZORDER BY, within partitions, rewrites what it targets, weaker with each column, never run by predictive optimization. - Liquid clustering: up to 4 keys, incremental
OPTIMIZE, keys changeable (OPTIMIZE FULLto recluster), incompatible with partitioning and ZORDER. MERGE,UPDATEandDELETEdon't cluster on write;OPTIMIZEor predictive optimization catches up.
Try a question
An engineer wants to create workspace.sales.orders_lc from workspace.sales.orders_raw in one statement, as a table liquid clustered by customer_id. Which statement does this?
- A
CREATE TABLE workspace.sales.orders_lc AS SELECT * FROM workspace.sales.orders_raw CLUSTER BY customer_id - B
CREATE TABLE workspace.sales.orders_lc PARTITIONED BY (customer_id) CLUSTER BY (customer_id) AS SELECT * FROM workspace.sales.orders_raw - C
CREATE TABLE workspace.sales.orders_lc CLUSTER BY (customer_id) AS SELECT * FROM workspace.sales.orders_raw - D
CREATE TABLE workspace.sales.orders_lc AS SELECT * FROM workspace.sales.orders_raw ZORDER BY (customer_id)
Show the answer
C. In a CTAS statement, CLUSTER BY must come right after the table name, before AS SELECT. Placed at the end of the SELECT, CLUSTER BY is the query clause that distributes and sorts the result rows, so the new table gets no clustering keys.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Choosing a Layout: Liquid Clustering, Deletion Vectors, Partitioning and Z-order teaches this objective (about 55 minutes), and 17 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Explain how Unity Catalog managed tables, Predictive Optimization, and Liquid Clustering reduce operational and maintenance overhead for a given workload.
- Choose the appropriate Delta optimization technique (deletion vectors, Liquid Clustering, CLUSTER BY AUTO) for a given table access pattern.
- Understand how caching (Delta cache) improves query performance for repeated reads of the same data.
- Apply Change Data Feed (CDF) to expose row-level changes (updates/deletes) for efficient incremental downstream processing.
- Use the query profile to identify performance bottlenecks, such as data-skipping inefficiencies, join strategies, and shuffle operations.