Data Migrations
Learn how to import or export data from and to Cosmos DB and other databases and the options available based on the work flow.
We'll cover the following
Introduction
A typical scenario when working with databases is data migrations. We might want to import data in Cosmos DB or export it from it. While a custom solution is always possible, some existing tools might help.
Data migration tool
The first option is to use the Azure Cosmos DB Data Migration tool. It’s an extensible multi-platform .NET 6 application available in the official GitHub repository.
The tool works by providing a source and sink from the following extensions:
Cosmos DB NoSQL API
Cosmos DB Mongo API
Cosmos DB Table API
SQL Server
JSON
Custom
Each extension needs to be configured. For this reason, by default, the tool looks for a migrationsettings.json
file with the SourceSettings
and SinkSettings
objects. Let’s see a couple of examples.
To import data from a JSON file, we need the following configuration:
Get hands-on with 1400+ tech skills courses.