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 do bucketing in Databricks?

Arun_tsr
New Contributor III

We are migrating a job from onprem to databricks. We are trying to optimize the jobs but couldn't use bucketing because by default databricks stores all tables as delta table and it shows error that bucketing is not supported for delta. Is there anyway to do this?

6 REPLIES 6

Debayan
Databricks Employee
Databricks Employee

Arun_tsr
New Contributor III

Hi @Debayan Mukherjeeโ€‹ We are following similar syntax for creating the bucketed table. But we are getting the following error,

Operation not allowed: `Bucketing` is not supported for Delta tables

Databricks by default considering the created tables as delta

Pat
Honored Contributor III

Hi @Arun Balajiโ€‹ ,

bucketing is not supported for the delta tables as you have noticed.

For the optimization and best practices with delta tables check this:

https://docs.databricks.com/optimizations/index.html

https://docs.databricks.com/delta/best-practices.html

Arun_tsr
New Contributor III

Is it possible to create a table without making it a delta tableโ€‹?

Pat
Honored Contributor III

good question ๐Ÿ˜‰ I was going to mention this.

You can still use external tables. Those tables will be stored outside the main (root) metastore bucket/container.

https://docs.databricks.com/data-governance/unity-catalog/create-tables.html

https://docs.databricks.com/data-governance/unity-catalog/manage-external-locations-and-credentials....

then you can use parquet tables.

It seems like the way forward is to use managed tables with Unity Catalog, they are gaining some performance improvements over time.

Pat
Honored Contributor III

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group