g.addV('<vertexLabel>'). property ('<property_key>', <property_value>) ...
Vertex data is inserted using
addV, a TinkerPop step.
A previously created hvertex label is required along with the properties that define the partition key.
Additional properties can be inserted with the required properties.
Property keys and value types must be defined in the schema for vertex labels.
property, a valid data type value must be inserted.
Some data types require special handling in entering the property value:
Date and Time: Strings with quotes and either
as LocalTime, respectively.
All collections (Set, List, Map): Square brackets around quoted entries, followed by
as Setfor sets and
as Mapfor maps. Lists only require square brackets.
Tuple: Square brackets around quoted entries,
as Tupleafter the tuple, enclosed in a second set of square brackets.
Geospatial properties will require
as LineString, or
UUID: String with quotes and
Create a vertex with a vertex label
person with the partition key
person_id and properties
g.addV('person'). property('person_id', 'adb8744c-d015-4d78-918a-d7f062c59e8f' as UUID). property('name', 'Simone BECK'). property('gender','F'). property('nickname', ['Simca', 'Simone'] as Set). property('country', [['France', '1904-07-07' as LocalDate, '1991-12-20' as LocalDate] as Tuple])
Carefully study the use of special formatting for items like UUID, where
as UUID must be included to convert the string to a UUID on insertion.