Reputation: 402
Azure Cosmos DB
has an option of import
to the database from local storage however, it has no such option of export
.
I want to know all possible methods of directly exporting the database or a container to my local storage (json
files) ie. without involvement of any other storage such as blob
storage.
Thanks in advance!
Upvotes: 4
Views: 11114
Reputation: 1594
A quick and simple way to export data from small containers is via a SQL query.
Write a new SQL query against your container:
And use the default query to select all of your data
SELECT * FROM c
This will give you all of your data in a json format, and you can copy paste it to a local file.
Note that this is only a good option for relatively small data amounts. For larger amounts of data you should stick with the options suggested by @JayGong in the accepted answer.
Upvotes: 1
Reputation: 23782
2 options for your references:
1.Azure Cosmos DB Migration Tool, you could export cosmos db data into local json file,please refer to this link.
2.Azure Data Factory,you could use copy activity to transfer data from cosmos db source into local file system sinklink.
Upvotes: 5