提问参考模版:
-
nebula 版本:3.6.0
-
部署方式: 单机
-
安装方式:源码编译
-
是否上生产环境:Y
-
问题的具体描述
-
我在执行如下nGQL 语句获取最短路径时:
FIND SHORTEST PATH WITH PROP FROM "dwd_label_3bc5e602b2d4c7fffe79258e2ac6952e"
TO "dwd_label_b54a7faadf3ab2373c646cc95a654377" OVER * BIDIRECT upto 2 steps YIELD path as p
返回的数据如下:
<("dwd_label_3bc5e602b2d4c7fffe79258e2ac6952e" :dwd_label{creation_time: 1715847504, display_desc: "邮箱", display_id: "dwd_label_3bc5e602b2d4c7fffe79258e2ac6952e", label: "邮箱"})<-[:edge_label@0 {creation_time: 1715847504, display_desc: "类别"}]-("dwd_number_13365XXXXXXXX" :dwd_number{city: "滨州", creation_time: 1715847504, display_desc: "中国山东滨州电信号码", display_id: "dwd_number_13365432122", nation: "中国", number: "13365XXXXX", operators: "电信", province: "山东"})-[:edge_label@0 {creation_time: 1715847504, display_desc: "类别"}]->("dwd_label_b54a7faadf3ab2373c646cc95a654377" :dwd_label{creation_time: 1715847504, display_desc: "物流类", display_id: "dwd_label_b54a7faadf3ab2373c646cc95a654377", label: "物流类"})>
我看使用了console 客户端执行语句返回值如下:
{
"code": 0,
"message": "",
"data": {
"headers": [
"p"
],
"tables": [
{
"_pathsParsedList": [
{
"relationships": [
{
"dstID": "dwd_label_3bc5e602b2d4c7fffe79258e2ac6952e",
"edgeName": "edge_label",
"rank": 0,
"srcID": "dwd_number_133654XXXXX"
},
{
"dstID": "dwd_label_b54a7faadf3ab2373c646cc95a654377",
"edgeName": "edge_label",
"rank": 0,
"srcID": "dwd_number_133654XXXXX"
}
],
"type": "path"
}
],
"p": "\u003c(\"dwd_label_3bc5e602b2d4c7fffe79258e2ac6952e\" :dwd_label{creation_time: 1715847504, display_desc: \"邮箱\", display_id: \"dwd_label_3bc5e602b2d4c7fffe79258e2ac6952e\", label: \"邮箱\"})\u003c-[:edge_label@0 {creation_time: 1715847504, display_desc: \"类别\"}]-(\"dwd_number_133654XXXXX\" :dwd_number{city: \"滨州\", creation_time: 1715847504, display_desc: \"中国山东滨州电信号码\", display_id: \"dwd_number_133654XXXXX\", nation: \"中国\", number: \"133654XXXXX\", operators: \"电信\", province: \"山东\"})-[:edge_label@0 {creation_time: 1715847504, display_desc: \"类别\"}]-\u003e(\"dwd_label_b54a7faadf3ab2373c646cc95a654377\" :dwd_label{creation_time: 1715847504, display_desc: \"物流类\", display_id: \"dwd_label_b54a7faadf3ab2373c646cc95a654377\", label: \"物流类\"})\u003e"
}
],
"timeCost": 7389,
"localParams": null
}
}
使用nebula-python 3 版本查询结果如何渲染成客户端返会的数据呢?有具体的工具吗?或者对应样例代码?