Home / DE Professional practice test / Cost & Performance Optimisation / Question

Databricks Data Engineer Professional · free practice question

An existing production Delta table is configured with Hive-style date partitioning (`PARTITIONED BY date`) and a nightly Z-order job (`OPTIMIZE ... ZORDER BY…

Exam-style question on Cost & Performance Optimisation from the free DE Professional practice test, with the answer and a full explanation below.

Updated November 16, 2026

Cost & Performance Optimisation Medium

An existing production Delta table is configured with Hive-style date partitioning (PARTITIONED BY date) and a nightly Z-order job (OPTIMIZE ... ZORDER BY (region, category)). The data engineering team wants to migrate this table to liquid clustering for better performance and reduced maintenance overhead. Which of the following statements is TRUE about this migration, and what is the recommended approach?

  1. ALiquid clustering is compatible with existing Hive-style partitioning. You can add CLUSTER BY (region, category) to the existing partitioned table via ALTER TABLE, and subsequent OPTIMIZE runs will apply both partitioning-pruning and clustering simultaneously.
  2. BALTER TABLE ... CLUSTER BY (date, region, category) can be run on the existing partitioned table and automatically drops the partition scheme, then rewrites all historical data into the clustered layout in a single atomic operation.
  3. CLiquid clustering is incompatible with partitioning and ZORDER. To migrate, the table must be recreated without partitioning (e.g., via CTAS without PARTITION BY), specifying CLUSTER BY (date, region, category) at creation. To apply clustering to all historical records, run OPTIMIZE FULL on the new table.
  4. DLiquid clustering replaces Z-order but still requires partitioning for high-cardinality timestamp columns. The correct approach is CLUSTER BY (region, category) while preserving the date partition column for range-based pruning.
  5. ELiquid clustering can be enabled on any existing unpartitioned Delta table via ALTER TABLE ... CLUSTER BY (...) without rewriting data. However, for a partitioned table, you must first run ALTER TABLE REMOVE PARTITIONING, which is not supported in Delta Lake — so recreation via CTAS is the only path.
Answer & explanation

Correct answer: C

WHY C: Liquid clustering is explicitly incompatible with both Hive-style partitioning and ZORDER. You cannot add liquid clustering to an existing partitioned table — the table must be recreated without partitioning. The correct migration path is CTAS (CREATE TABLE ... AS SELECT) without a PARTITION BY clause, specifying CLUSTER BY on the migration-recommended columns. For a table using partition key (date) + ZORDER keys (region, category), the documentation recommends using all as clustering keys: CLUSTER BY (date, region, category). After creating the table with liquid clustering, OPTIMIZE FULL (Databricks Runtime 16.0+) forces reclustering of all existing records. WHY NOT A: Liquid clustering is NOT compatible with partitioning — attempting to add CLUSTER BY to a partitioned table will fail. WHY NOT B: ALTER TABLE ... CLUSTER BY only works on existing UNPARTITIONED tables. It does not drop partitioning or rewrite historical data — and it would fail on a partitioned table. WHY NOT D: Using liquid clustering alongside partitioning simultaneously is not supported. Liquid clustering is designed to REPLACE both partitioning and Z-order, not supplement them. WHY NOT E: An ALTER TABLE REMOVE PARTITIONING command is not supported in Delta Lake. Option E's conclusion (CTAS is required) is correct, but the framing misidentifies the blocking issue. Delta liquid clustering cannot be added to a partitioned table — the incompatibility is by design, not merely due to a missing ALTER TABLE command.

Take the full DE Professional practice test free →

Would you pass today?

This question is one of 60 in the free, timed Databricks Data Engineer Professional practice test. Take it and get a section-by-section score.

Start the free test →