English

Problem: Publishing a GeoEvent Service maps null values to the feature service attributes

Description

Upon successfully publishing a GeoEvent Service containing arrays to a feature service, the GeoEvent Service maps the values from the array as null values to the output feature service attribute tables.

Cause

The most common causes of null values displaying in the feature service attribute table are:

  1. The usage of arrays in a GeoEvent Service
The JavaScript Object Notation (JSON) of the GeoEvent Service contains fields with square brackets "[ ]" after the field names, indicating that the fields contains an array. An empty array "[ ]" is a valid data type, however the database is unable to interpret the data. To ensure the table is populated, the database writes <NULL> to the attribute values.

Additionally, in the event a value is not defined in the square brackets for the field, the field cardinality is defined as infinite, hence returning a null value as the array is unable to accurately map the desired field to the output feature service. The field cardinality for an array can be found in the ArcGIS GeoEvent Manager. For more information on field cardinality, refer to ArcGIS Help: Managing GeoEvent Definitions.
Image of the ArcGIS GeoEvent Manager
  1. Improper data length or data type formatting
If the data length or data type defined in the GeoEvent service does not match that of the GeoEvent definition, the database maps the values as <NULL>. For example, the GeoEvent service sends data to a field labelled latitude with the data type set as Double. However in the GeoEvent definition, latitude data type is set as String. The mismatching data formatting forces the database to write <NULL> in place of the values, as the database ensures that all fields are populated.

Solution or Workaround

  • Map the arrays
To map the array field, open the Field Mapper processor in the GeoEvent Service, and find the appropriate field in the input definition side. Manually type [0] after the field name. This indicates that the first item from the array is mapped to the output field, allowing all other fields to be populated successfully.
Image of the Field Mapper
  • Use consistent data formatting
To ensure consistent data formatting, check and ensure the data length does not exceed the limit defined in the database. Additionally, as stated in the Cause section, ensure the data type in the GeoEvent definition is consistent with the data type defined in the GeoEvent service.
 

Related Information