CosmoStore icon indicating copy to clipboard operation
CosmoStore copied to clipboard

Easy Migration from AzureTable to Serverless CosmosDB Account

Open DaveJohnson8080 opened this issue 9 months ago • 1 comments

I really enjoy using CosmoStore. Thanks for creating it!

Apologies if anyone has already shared this or I missed documentation.

I was running into some of the size limitations using AzureTable storage and decided to give the new AzureTable and Serverless/Consumption plan support for CosmosDB.

https://learn.microsoft.com/en-us/azure/cosmos-db/table/introduction

It was easy enough to update the existing TableStorage configuration to make that happen. After creating your CosmosDB AzureTable instance (see the link above for that)...

let sovereignCloud = 
    CosmoStore.TableStorage.SovereignCloud (acctName, acctKey, "cosmos.azure.com")
let config = 
    {   
        TableName = tableName
        Account = sovereignCloud
    }
config
|> CosmoStore.TableStorage.EventStore.getEventStore

SovereignCloud to the rescue! Someone was forward-thinking there!

Thanks!

DaveJohnson8080 avatar Oct 31 '23 20:10 DaveJohnson8080

Hi Dave, thanks for that! Feel free to send PR to have this a part of official README 😄

Dzoukr avatar Nov 01 '23 07:11 Dzoukr