labelField
How to designate the vertex label to use when loading data from a data file using the contents of a field in the data file.
Synopsis
labelField "fieldName"
Description
Sets the label of the vertex to the name associated with the given field in the input data file. The vertex label must already exist.
labelField
can be used in both vertex and incident edge mapping (inE, outE).
Examples
Set the label in a mapping script to the field name
type.
labelField "type"
The contents of the field type
will designate the vertex label. For instance, if a record in the data file has the field
type entered as author, then the record will be read into a vertex with the
vertex label set to author. The next record might instead have a value of
recipe for the type field, and the data will be read into a vertex with a
vertex label set to recipe. Thus, mixed sets of data can be read from a single input
data file.