Cosmos DB - Graph API - Export graphSON and try to import it with Migration tool

梦想的初衷 提交于 2019-12-08 08:43:16

问题


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

}

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.


回答1:


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.



来源:https://stackoverflow.com/questions/49003375/cosmos-db-graph-api-export-graphson-and-try-to-import-it-with-migration-tool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!