Latest
Databricks releases Efficient Column Updates in Beta, cutting backfill time tenfold
Image: Databricks

Databricks releases Efficient Column Updates in Beta, cutting backfill time tenfold

Chat about this article with your favourite AI tool

Databricks has released Efficient Column Updates in Beta, a feature that writes only the new values when a user adds a column to a table and fills it in. The company said that in its tests on a 50 GB table with 6 million rows and 1,000 columns, the operation took 88 seconds, compared with 15 minutes for a standard update. That is roughly a tenfold improvement.

The problem with backfilling

Tables used for AI and machine learning development tend to grow wider over time, Databricks said, as teams add new features, quality scores from labeling passes or embeddings from newer models. Adding an empty column has always been instant. Populating it is the slow part.

Databricks Efficient Column Updates feature announcement graphic
Image: Databricks

The cause is “copy-on-write”, a mechanism in open table formats. Data files have had to store all of a table’s columns together, so filling one new column means rewriting each file in full, including images, text and older embeddings that did not change.

Databricks said this makes adding one column to a thousand-column table take about as long as rewriting all thousand. It also makes automated research costly. An agent that proposes a feature, adds it, trains a model and checks the result can run many more experiments in an hour than a human researcher runs in a week, and each attempt triggers another full rewrite.

Teams often work around the issue by keeping new columns in side tables or copying data into a separate system. Databricks said that leaves another system to keep in sync and secure.

Databricks Efficient Column Updates feature announcement graphic
Image: Databricks

How the feature works

With Efficient Column Updates, Databricks saves new values in a sidecar file next to each existing data file and leaves the original files untouched. The engine stitches the two together at read time, so query results are unchanged.

  • Update speed: only new values are written, so a small change stays a small job as the table grows.
  • Familiar SQL: users add columns with ALTER TABLE and fill them with UPDATE. If Databricks cannot take the fast path for an update, it runs a standard update with the same result.
  • One copy of data: experiments run on the same Unity Catalog managed table used for other work, keeping governance consistent.

The update still reads its inputs and computes the new values, Databricks noted. What it skips is the rewriting.

Setup and requirements

A workspace admin first enables the feature on the Previews page, then sets a table property. Databricks said the feature is available for Unity Catalog managed Delta tables on Databricks Runtime 19 and above. Tables need catalog commits, row tracking, deletion vectors and column mapping in id mode, and these must be set when the table is created.

Databricks said Iceberg support is coming soon. It is working with the open source community to add the capability to the Apache Iceberg specification.

Turning it off

Users can disable the feature by setting the table property to false, then running REORG TABLE … APPLY (PURGE) to fold the sidecar files back into the data files. Values are preserved. However, the table still requires Databricks Runtime 19 or above afterward, and DROP FEATURE is not supported in the Beta. Databricks advised trying the feature first on tables that are not critical.

Documentation is available, and the Beta can be enabled from the workspace previews page.

Source: Databricks Blog