简体   繁体   中英

Migrating a Cosmos DB fixed collection with partition key to an unlimited collection

I have a Cosmos DB Fixed Collection. The collection was created and utilizes a partition key.

What are the migration options from this Fixed Collection to an Unlimited Collection?

I know that I can use the Azure Cosmos DB Migration Tool to export data to JSON, then import it into a newly provisioned Unlimited Collection. Are there any other options supported by Microsoft?

The Azure team wrote a migration tool that uses Cosmos Change Feeds and the Change Feed Processor:

https://github.com/Azure/azure-documentdb-dotnet/tree/master/samples/ChangeFeedMigrationTool

The change feed processor works by checking a lease collection. The lease collection holds a document for each of your source collection partitions. If there are no documents in this lease collection (which there won't be the first time you start the program), all documents in your source collection are considered changes.

The migration tool copies any changed document into a destination collection (DocumentFeedObserver.ProcessChangesAsync).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM