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

Delta Table: Drop column failure

auser85
New Contributor III

DBR 10.5, Spark 3.2.1

```

%sql

CREATE TABLE testing (

    name string,

    counter int

    )

     USING DELTA

     OPTIONS (PATH "/mnt/general/testingtbl/")

```

```

%sql

insert into testing (name, counter) values ('a', 1)

```

```

%sql

ALTER TABLE testing SET TBLPROPERTIES (

 'delta.minReaderVersion' = '2',

 'delta.minWriterVersion' = '5',

 'delta.columnMapping.mode' = 'name'

)

```

```

%sql alter table testing drop column counter

```

Returns this error: Unrecognized column change class org.apache.spark.sql.connector.catalog.TableChange$DeleteColumn. You may be running an out of date Delta Lake version

1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz
Community Manager
Community Manager

Hi @Andrew Fogarty​, What runtime are you using?

You can drop one or more columns or fields in a Delta Lake table since DBR runtime 11.0.

View solution in original post

4 REPLIES 4

Kaniz
Community Manager
Community Manager

Hi @Andrew Fogarty​, What runtime are you using?

You can drop one or more columns or fields in a Delta Lake table since DBR runtime 11.0.

Kaniz
Community Manager
Community Manager

Hi @Andrew Fogarty​​, We haven’t heard from you on the last response from me, and I was checking back to see if you have a resolution yet. If you have any solution, please share it with the community as it can be helpful to others. Otherwise, we will respond with more details and try to help.

auser85
New Contributor III

Yes DBR 11.0 Beta allows that functionality!

Kaniz
Community Manager
Community Manager

Awesome!

Thank you for your update @Andrew Fogarty​!

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.