Multiple Vertices

In my current use case while implementing supply chain management , i know how to create the 100 vertices and 40 edges manually ,But i want to know, if there is any way to create the same non manually ?

Hi Roshan,

You can use our GSQL language to create vertices and edges in the schema. Check out this link for some more details, but the basics of it will look like this:

CREATE VERTEX Person(PRIMARY_ID id STRING, name STRING birthday DATETIME) WITH PRIMARY_ID_AS_ATTRIBUTE="true"
CREATE VERTEX House(PRIMARY_ID id STRING, address STRING) WITH PRIMARY_ID_AS_ATTRIBUTE="true"
CREATE DIRECTED EDGE lives_at(FROM Person, TO House, moved_in DATETIME) WITH REVERSE_EDGE="reverse_lives_at"
CREATE UNDIRECTED EDGE has_friend(FROM Person, TO Person)
1 Like