Property types for Dgraph records

This topic describes the format of the property types supported by the Dgraph process of the Oracle Endeca Server and the Data Ingest Web Service.

The following table lists the property types that are used by the Dgraph process of the Oracle Endeca Server to create standard attributes:
Dgraph property name Property type
mdex:string Represents XML-valid character strings.
mdex:int Represents a 32-bit signed integer.
mdex:long Represents a 64-bit signed integer.
mdex:double Represents a floating point.
mdex:boolean Represents a Boolean.
mdex:time Represents the time of day to a resolution of milliseconds.
mdex:dateTime Represents the date and time to a resolution of milliseconds.
mdex:duration Represents a length of time with a resolution of milliseconds.
mdex:geocode Represents latitude and longitude pairs.

The type for properties is specified in the type XML attribute of a record element. The default type of created standard attributes is mdex:string if not otherwise specified. Assignments for an existing standard attribute that specify a type different from that of the associated standard attribute will succeed or fail as per the underlying put-record functionality.

The type is only checked by the Endeca Server when you initially create the attribute. If the attribute already exists, the Endeca Server ignores the type if it is specified, and does not perform any additional type checking to ensure that the type matches the type that exists in the Endeca Server for this attribute.

Errors from incorrect property values and types

You must ensure that you specify the appropriate value type for each property type. For example, attempting to assign a double value (such as 19.99) to an mdex:int property will return an ingestFault indication a parsing error, as in this example:
Error applying updates: Unable to parse property value "19.99" for property "NumInStock" 
with type "mdex:int" on record FactSalesID:569

The Unable to parse property value error should be returned for any mismatched attribute value, including using an incorrect case for Boolean values (for example, specifying "FALSE" instead of "false").

Likewise, a type mismatch is caught whenever an assignment with the wrong type is added. When a type mismatch is encountered during a bulk load, the Dgraph will produce the following error and send it back over the response channel to the bulk load client:
Expected an assignment of type <type> for property <propertyName>, but got type <type> instead.
Change your schemas so that the type for this property is the same for your ingest pipeline and the dgraph.

This error causes the bulk load to fail (which should be apparent from the Dgraph log), and the above message should be received by the client.