图引擎服务 GES-HyG导入图:请求示例

时间:2024-05-25 09:14:00

请求示例

进行导入图操作,边文件目录为testbucket/demo_movie/edges/,边数据集格式为csv,点文件目录为testbucket/demo_movie/vertices/,点数据集格式为csv,新增数据的元数据文件OBS路径为testbucket/demo_movie/schema.xml,日志存放目录为testbucket/importlogdir。

POST http://{SERVER_URL}/ges/v1.0/{project_id}/hyg/{graph_name}/import-graph
{
  "edgesetPath": "testbucket/demo_movie/edges/",
  "vertexsetPath": "testbucket/demo_movie/vertices/",
  "schemaPath": "testbucket/demo_movie/schema.xml",
  "logDir": "testbucket/importlogdir",
  "delimiter": ",",
  "trimQuote": "\"",
  "obsParameters": {
    "accessKey": "xxxxxx",
    "secretKey": "xxxxxx"
  },
  "vertex": [
        {
            "property": [
                "title",
                "movieid"
            ],
            "label": "movie"
        }
    ],
    "edge": [
        {
            "property": [
                "Rating",
                "Datetime"
            ],
            "label": "rate"
        }
    ]
}

SERVER_URL:图的访问地址,取值请参考业务面API使用限制

support.huaweicloud.com/api-ges/ges_03_0542.html