cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

docs.databricks.com

Ajay-Pandey
Esteemed Contributor III

Rename and drop columns with Delta Lake column mapping.

Hi all,

Now databricks started supporting column rename and drop.

Column mapping requires the following Delta protocols:

  1. Reader version 2 or above.
  2. Writer version 5 or above.

Blog URL

##Available in Databricks Runtime 10.2 and above.
ALTER TABLE <table_name> RENAME COLUMN old_col_name TO new_col_name
 
##Available in Databricks Runtime 11.0 and above.
ALTER TABLE table_name DROP COLUMN col_name
ALTER TABLE table_name DROP COLUMNS (col_name_1, col_name_2, ...)

3 REPLIES 3

Kaniz
Community Manager
Community Manager

Keep sharing such amazing features with the community @Ajay Pandey​ !

Ajay-Pandey
Esteemed Contributor III

Sure!

Poovarasan
New Contributor II

Above mentioned feature is not working in the DLT pipeline. if the scrip has more than 4 columns 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.