Cosmos DB-图形API-导出graphSON并尝试使用迁移工具将其导入 [英] Cosmos DB - Graph API - Export graphSON and try to import it with Migration tool
问题描述
我在新图中插入了一些顶点和边".我已经将生成的grapSON保存在json文件中.然后,我尝试使用迁移工具将该json文件导入到新图形中.它只是部分起作用.我有一个带有顶点的新图形,但是它们没有像这样的属性或边线:
I inserted a few Vertices and Edges in a new graph. I've saved the resulting grapSON in a json file. Then I tried to import that json file into a new graph with the Migration tool. It only partially worked. I had a new graph with my Vertices but they had no properties or Edges like that:
{
"id": "c39f435b-350e-4d08-a7b6-dfcadbe4e9c5",
"label": "user",
"type": "vertex",
"_isFixedPosition": true,
"_isRoot": true
}
有人知道如何欺骗"迁移工具来创建新图形吗?我正在尝试将现有的SQL DB迁移到图形,以便可以以编程方式生成graphSON.
Does anyone knows how to "trick" the migration tool to create new graphs? I'm trying to migrate an existing SQL DB to a graph so I could generate the graphSON programatically.
推荐答案
我刚解决的一种方法是使用数据迁移工具将当前图形数据库(作为Documents DB连接)导出为JSON文件.然后在门户网站上导入导出的JSON.
A way I just worked out is to use the Data Migration Tool to export the current graph database (connect as a Documents DB) as a JSON file. Then on the portal import the exported JSON.
添加了带有顶点和边缘完好无损的图形.
Added the graph with vertices and edges in tact.
这篇关于Cosmos DB-图形API-导出graphSON并尝试使用迁移工具将其导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!