From 27ddcaeb5662399868388b448dbbcbc91b32e9cc Mon Sep 17 00:00:00 2001 From: Wey Gu Date: Fri, 17 Mar 2023 08:36:57 +0000 Subject: [PATCH] docs: add nebula-up playground for ngdi-graphd --- docs/ngdi_API_Gateway.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/ngdi_API_Gateway.md b/docs/ngdi_API_Gateway.md index 1b6507c..cea7b97 100644 --- a/docs/ngdi_API_Gateway.md +++ b/docs/ngdi_API_Gateway.md @@ -5,6 +5,33 @@ ngdi API Gateway is a RESTful API server that provides a unified interface for n With ngdi API Gateway and ngdi UDF, we could call ngdi algorithms from ngql. +## Playground in 5 minutes + +```bash +curl -fsSL nebula-up.siwei.io/all-in-one.sh | bash -s -- v3 spark +``` + +> see [Nebula-UP](https://github.com/wey-gu/nebula-up) for more details. + +Then load the basketballplayer dataset: + +```bash +~/.nebula-up/load-basketballplayer-dataset.sh +``` + +And start ngdi API Gateway from PySpark Jupyter Notebook: + +Go to http://localhost:8888, open data_intelligence_suite_nGQL_UDF.ipynb and run the first cell to start the ngdi API Gateway. + +Call ngdi from NebulaGraph studio: http://localhost:7001 , **note** the host to login is `ngdi_graphd` `9669`. +Run query in the console: + +```cypher +RETURN ngdi("pagerank", ["follow"], ["degree"], "spark", + {space: "basketballplayer"}) +``` + + ## Calling from ngql ```cypher