Open jiagh2010 opened 4 months ago
@jiagh2010 I added a NebulaQueryReader
for such use cases, please give a try :)
NebulaReader
is for scan whole graph of data while NebulaQueryReader
is for construct any query into nx object
from ng_nx import NebulaQueryReader
from ng_nx.utils import NebulaGraphConfig
config = NebulaGraphConfig(
space="demo_basketballplayer",
graphd_hosts="127.0.0.1:9669",
metad_hosts="127.0.0.1:9559"
)
reader = NebulaQueryReader(nebula_config=config)
# Execute a custom query
query = "MATCH p=(v:player{name:'Tim Duncan'})-[e:follow*1..3]->(v2) RETURN p"
g = reader.read(query)
close via #7
Why does NebulaGraph-nx only read edge information, when the input should be a graph?】