Unable to Retrieve Property Values using MATCH Query in Nebula Graph #5748
-
Hello Nebula Graph Community, apologies in advance, but I am just getting started here with graph databases as a whole so some ridiculous queries may be coming from myself. Please let me know if there is somewhere more suited to post my idiotic questions :) I am working on an Intent-Based Networking operation script to compare a golden configuration with the actual configuration on my Cisco devices using Nebula Graph to store the golden config. I have set up a schema with vertices for routers and their BGP neighbors, and edges to represent the relationships between them. I am trying to match and retrieve data based on the router's name instead of an ID. However, I am running into an issue while trying to execute a MATCH query to retrieve property values. Here's a snippet of how I've set up the schema and inserted data: CREATE SPACE network_topology (partition_num=10, replica_factor=1, vid_type = FIXED_STRING(30)); I am working on a project where I need to match the hostname of a router device (defined in a GoLang script as a struct) with its corresponding entry in Nebula Graph, and then conduct queries to verify certain properties. The goal is to ensure that the configuration on the Cisco device matches the 'golden' configuration stored in Nebula Graph for that particular device. I am currently testing this setup with two host devices. However, I am facing an issue with retrieving property values using the MATCH query in Nebula Graph. The query seems to execute, but it returns null values for the properties I am interested in. Here's the query I am using: MATCH (r:router) RETURN r.name AS name; output: +----------+ The response I get is NULL for the name property, although I have confirmed that these properties are set and can be retrieved using other query forms. MATCH (v) RETURN v; Could anyone provide insight into what might be going wrong, or suggest how I should structure the MATCH query to correctly retrieve the property values? Thanks and apologies in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Please refer to documentation, NebulaGraph's cypher is a little bit different, for r.name it should be r.router.name here :)
|
Beta Was this translation helpful? Give feedback.
Please refer to documentation, NebulaGraph's cypher is a little bit different, for r.name it should be r.router.name here :)