Cannot Remove Table from Delta Share
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2025 01:18 PM
Hello!
We have some production data pipelines using delta shares that have previously worked but broken today and I can't find a new solution.
I create a delta share:
CREATE SHARE IF NOT EXISTS `local_new_2022`
Then, like normal, I add a table to the share with an alias:
ADD TABLE `amplifydata_local_local`.`default`.`a3cfbc5bd7bc947eaa8526d48c77e1d39` AS `default`.`new_2022`;
I can confirm via the UI and queries that there is data in the table, and I can run `SHOW ALL IN SHARE` to confirm that this table has been added to the share.
ADD TABLE `amplifydata_local_local`.`default`.`a3cfbc5bd7bc947eaa8526d48c77e1d39` AS `default`.`new_2022`;
I can confirm via the UI and queries that there is data in the table, and I can run `SHOW ALL IN SHARE` to confirm that this table has been added to the share.
Now, however, I cannot remove the table from the share. I have tried using the alias name, as well as the full table reference, but neither of them works.
ALTER SHARE local_new_2022 REMOVE TABLE default.new_2022;
ALTER SHARE local_new_2022 REMOVE TABLE amplifydata_local_local.default.new_2022;
ALTER SHARE local_new_2022 REMOVE TABLE default.new_2022;
ALTER SHARE local_new_2022 REMOVE TABLE amplifydata_local_local.default.new_2022;
ALTER SHARE local_new_2022 REMOVE TABLE amplifydata_local_local.default.a3cfbc5bd7bc947eaa8526d48c77e1d39
I can further confirm the share is part of the table, because when I try to drop the table, I am shown the error:
2025-07-28 16:16:32 | INFO | loggers | *** databricks.sql.exc.ServerOperationError: [RequestId=cecff0fa-dad6-4804-b857-03227451e5e8 ErrorClass=INVALID_STATE] TABLE amplifydata_local_local.default.a3cfbc5bd7bc947eaa8526d48c77e1d39 cannot be deleted because it is being shared via Delta Sharing. It is shared through the following shares: local_new_2022. If you just want to update a shared view, please use ALTER VIEW instead.
2025-07-28 16:16:32 | INFO | loggers | *** databricks.sql.exc.ServerOperationError: [RequestId=cecff0fa-dad6-4804-b857-03227451e5e8 ErrorClass=INVALID_STATE] TABLE amplifydata_local_local.default.a3cfbc5bd7bc947eaa8526d48c77e1d39 cannot be deleted because it is being shared via Delta Sharing. It is shared through the following shares: local_new_2022. If you just want to update a shared view, please use ALTER VIEW instead.
I have also tried running REFRESH TABLE against the table itself. This seems to have had no effect.
I would really appreciate any help trying to figure out how to remove this table from the share.