1

There are two azure emulators supporting local development, "azure storage emulator" supporting queue, cache, blob etc while "azure documentdb emulator" supporting documentdb.

Before, we have everything in one mssql database, take snapshot of the database and use that as our local development database. But when we split the data into blob and documentdb, we don't see how we can create replicates / snapshot of blob and documentdb and use that in local dev. Is there a way to synchronize the data between azure documentdb with the database used in emulators?

David Makogon
  • 69,407
  • 21
  • 141
  • 189
marc chen
  • 21
  • 1
  • 3
  • Are you looking for ways to sync data between a DocumentDB account in the cloud and the emulator? – Gaurav Mantri Apr 24 '17 at 13:51
  • I am not sure if emulator should be used, the goal is to have a local dev environment that is able to use copy of live data. Wheater that copy is located on Azure or local emulator, it does not matter – marc chen Apr 25 '17 at 08:08
  • Quite honestly, it does not make any sense. Your application need to connect to a DocumentDB source so it does matter whether your application is connecting to local emulator or DocumentDB account in cloud. – Gaurav Mantri Apr 25 '17 at 08:13
  • the emulator does mimic an azure documentdb (https://learn.microsoft.com/en-us/azure/documentdb/documentdb-nosql-local-emulator), the application can't tell the difference if it is connected to an azure documentdb or local emulator, the only difference is the configuration of endpoint – marc chen Apr 25 '17 at 08:29

2 Answers2

0

we don't see how we can create replicates / snapshot of blob and documentdb and use that in local dev.

It seems that you’d like to use the copies of Blob and DocumentDB for development and testing. As far as I know, we could not directly import/copy data from Azure Blob to Azure storage emulator, I recommend that you could copy data from one container to another container for your local development and testing. Besides, you could import data/documents from a production DocumentDB to the emulator using DocumentDB data migration tool, to achieve it, you need to change the connection mode to Gateway (in the data migration tool with the target set to the local emulator, click Target Information > Advanced Options > Connection Mode > Gateway).

Fei Han
  • 26,415
  • 1
  • 30
  • 41
  • Copy data function, does it apply to documentdb? what is the performance of [copy data](https://learn.microsoft.com/en-us/azure/storage/storage-use-azcopy)? The migration tool, we are using it to migrate data from SQL to documentdb at the moment, but the data synchronization between live and dev needs to be automatic at daily manner – marc chen Apr 25 '17 at 08:43
0

I think using the "Data Factory" porting data from one datasource to another datasource is the solution here? I just tried to port 2M rows from documentdb to an azure SQL database which is Premium, took 30, 40 mins to copy over 2M, that is good enough for our project.

marc chen
  • 21
  • 1
  • 3