16

Is it not possible to rename an Azure Storage Table?

I cannot seem to find anything online (not even cmdlets). There are no options for this in Visual Studio Server Explorer, Cloud Storage Studio or TableXplorer.

dreftymac
  • 27,818
  • 25
  • 108
  • 169
Dave New
  • 34,265
  • 48
  • 183
  • 366

3 Answers3

13

You're correct. It is not possible to rename an Azure Storage Table (or Blob Container or Queue for that matter).

Possible solution would be to download all entities from the table and upload them again in another table. Once all entities are uploaded, you can then delete the old table. When downloading entities, please do keep Continuation Token in mind as querying table would return up to 1000 entities per request.

You can download all entities using either Cloud Storage Studio (or Azure Management Studio) from Cerebrata or TableXplorer. If you want, you can use Azure Management Cmdlets from Cerebrata as well. It has cmdlets to export a table (Export-Table) and restore a table (Restore-Table).

Gaurav Mantri
  • 100,555
  • 11
  • 158
  • 192
  • 1
    Thanks Gaurav. The table consists of millions of records so it's not ideal to download and reupload, but no other choice it seems! – Dave New Dec 02 '13 at 07:38
  • 5
    To speed up the process, you could run the code in a VM running in the same data center as your storage account. Do take a look at this blog post: http://alexandrebrisebois.wordpress.com/2013/06/20/windows-azure-table-storage-service-migrating-tables-between-storage-accounts/. I think it does a streaming transfer without saving the data on disk first. – Gaurav Mantri Dec 02 '13 at 07:44
11

Now, you can rename Azure Tables with Microsoft's "Microsoft Azure Storage Explorer" (after version 0.8.3). You can also rename containers and file shares with this tool. See the release notes here.

Note that this feature has the following disclaimer during usage.

Renaming works by copying to the new name, then deleting the source item. Renaming a table currently loses the table's properties and metadata, and may take a while if there are lots of entities.

Therefore this is not an actual renaming behind the scenes and incurs read/write/transaction costs.

Nuri Tasdemir
  • 9,285
  • 2
  • 36
  • 60
3

You can also use AzCopy, which is a Microsoft command line tool for downloading/moving table data.

loneshark99
  • 646
  • 4
  • 15