简体   繁体   English

从 Azure 下载 Cosmos DB 的简单方法

[英]Easy way to download a Cosmos DB from Azure

I don't find how to download it.我没有找到如何下载它。 I'd like to do it for 2 reasons:我想这样做有两个原因:

  • Backup it to my computer备份到我的电脑
  • Try to open it with Microsoft Excel尝试用 Microsoft Excel 打开

However, I don't find an easy way like clicking on a button to download it.但是,我没有找到像单击按钮下载它那样简单的方法。

The only way seems to code a complex piece of code to go throw the whole database and export it in some format like JSON.唯一的方法似乎是编写一段复杂的代码来抛出整个数据库并以某种格式(如 JSON)导出它。

Am I right?我对吗? Hopefully you found an easy way to download the database from Azure!希望您找到了一种从 Azure 下载数据库的简单方法!

We clicked here:我们点击这里:

截屏

But that csv doesn't contain any data, just information about databases但是那个 csv 不包含任何数据,只包含有关数据库的信息

You could use Azure Data Factory and export your data eg to Blob Storage in CSV format.您可以使用 Azure 数据工厂并将数据导出到例如 CSV 格式的 Blob 存储。 should be very easy to build with the copy wizard https://docs.microsoft.com/en-us/azure/data-factory/quickstart-create-data-factory-copy-data-tool使用复制向导应该很容易构建https://docs.microsoft.com/en-us/azure/data-factory/quickstart-create-data-factory-copy-data-tool

The Export to CSV button that you showed above does only export the table of resources in the Azure Portal, it has nothing to do with Cosmos DB or even the data inside it.上面显示的“导出到 CSV”按钮仅导出 Azure 门户中的资源表,与 Cosmos DB 甚至其中的数据无关。

I use the Azure Cosmos DB Data Migration Tool for that purpose.为此,我使用了 Azure Cosmos DB 数据迁移工具。 You can download it here , and it's got a simple UI for both importing and exporting data.你可以在这里下载它,它有一个简单的用户界面,用于导入和导出数据。 I find it quite a bit easier than Data Factory.我发现它比数据工厂容易得多。 And since it runs locally on Windows, it also works with the Cosmos DB Emulator.由于它在 Windows 本地运行,因此它也适用于 Cosmos DB 模拟器。

我在 azure 工具中没有找到简单的方法,所以我使用指南针将数据导出为 json 以用于 mongoDB 集合,我称之为 EASY。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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