property

How to designate a property name to use when loading data from a data file.

Synopsis

property [ "csv_column" ] "propertyName"

Description

Identifies a property of a vertex to the given field name that will be mapped onto a property from an input data file. If a CSV column is named differently than the field in the graph, the CSV column name may be optionally set. If no property is set, all properties are read. If ignore is used, a property will be bypassed.

During the graphloaderstage 1 schema discovery, if a property key sequentially occurs multiple times on the same vertex, then the property is considered to be a multi-property. This is a reasonable deduction; however, it might change the discovered schema in certain fringe cases. Typically, in JSON input data, nested lists are mapped to multi-cardinality properties and should be read in that manner. If multi-cardinal fields exist in the input file, schema must define those elements prior to loading. Another example is a JDBC column that is of data type java.sql.Array.

Examples

Set property in a mapping script to gender. The values of the property will be read based on the values set in the value field of badge.
property "gender"
For this mapping, the data could be:
{ "name":"Jane Doe", "gender":"M" }
Set property to read a column nick in a CSV file to nickname in a mapping script.
property "nick" "nickname"
For this mapping, the data could be:
name, nick
Jane Doe|Janey