cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to enable Liquid Clustering on an existing Delta Live Table (DLT) and syntax for enabling it

Sakthi0311
New Contributor

 

Hi all,

Iโ€™m working with Delta Live Tables (DLT) and want to enable Liquid Clustering on an existing DLT table that was already created without it.

Could someone please clarify:

  1. How can I enable Liquid Clustering on an existing DLT table (without recreating the table if possible)?

  2. Whatโ€™s the correct syntax to use for enabling Liquid Clustering โ€” both for:

    • Automatic Liquid Clustering

    • Manual clustering with specific columns

      For example:

      • Should I use something like this inside the DLT notebook?

         

        CREATE OR REFRESH LIVE TABLE my_table TBLPROPERTIES ( delta.feature.liquidClustering = 'enabled', delta.liquidCluster.autoCluster = 'true') AS SELECT * FROM source_table;

        Or should it be enabled differently using ALTER TABLE?

        Iโ€™ve seen documentation about Liquid Clustering for regular Delta tables, but not much for DLT-managed tables.
        Would appreciate any working examples or syntax confirmation from someone whoโ€™s done this successfully.

        Thanks in advance!

2 REPLIES 2

szymon_dybczak
Esteemed Contributor III

 

 

szymon_dybczak
Esteemed Contributor III

Hi @Sakthi0311 ,

For SQL language you can enable LC for materialized views and streaming tables. So the syntax looks following:

szymon_dybczak_0-1761580796406.png

If you want to use automatic clustering then use CLUSTER BY AUTO.