Can`t drop the column, because another column was recently deleted

Viewed 48

I deleted the ColumnA at the table and want to drop the ColumnB.

ALTER TABLE Project.Schema.Table DROP COLUMN ColumnB;

But i got an error

Column `ColumnA` was recently deleted in the table `Table`. Deleted column name is reserved for up to the time travel duration, use a different column name instead.

Why I can`t delete ColumnB? How to do this? Only recreate the table?

1 Answers

This error occurs due to the Time Travel feature of BigQuery which enables recovery of data that is changed or deleted up to 7 days later.This feature maintains 7 days of history, including metadata history. There are two workaround possible for this issue:

  • Wait for 7 days and then retry to drop the other column.
  • Drop the table and recreate using a temporary table.

This issue has been raised in this Issue Tracker. You can “STAR” the issue to receive automatic updates and give it traction by referring to this link.

Related