Map Fields

Map Fields tool icon The Map Fields tool transforms data from an input schema to an output schema. Field calculations, creation of new fields, and tagging of Key Fields may be performed with the Map Fields tool.

Examples

  • A city GIS analyst wants to process any new features added to a feature layer and change field names, drop certain fields, and create other fields using Arcade expressions.
  • A data analyst wants to change the schema of millions of records of data stored in delimited text files stored in the cloud. This tool can change field names, drop some fields, and create other fields using Arcade expressions.
  • An IoT specialist wants to use an Arcade expression to parse geometry values from string field(s) and set these values as feature geometry.

Usage notes

  • Perform field calculations while mapping fields using Arcade expressions. Arcade is a lightweight and secure expression language written for use in ArcGIS. Like other expression languages, it can perform mathematical calculations and evaluate logical statements. For a full overview of expressions and functions supported, see The ArcGIS Arcade expression language.
  • Optionally, geometry can be configured and adjusted using the optional configure geometry parameters. Additional parameter details regarding geometry expression and spatial reference specification are available below.
  • ArcGIS clients do not currently support 64-bit integer field types. For this reason, if a field is designated as Int64, that field will be converted to Float64 and be listed as type Double in any associated map or feature services.
  • As an alternative to the Map Fields tool, field name modification and key field tagging can also be set when first configuring a source or feed. For details, see Configure input data.
  • In a real-time analytic, be careful not to remove the TRACK_ID tag from a feed as that will invalidate it. As a best practice, when changing the field tagged with TRACK_ID, the new TRACK_ID field should be one whose values are the result of a function that incorporates the original TRACK_ID field values. For example, this might be a new field containing a concatenation of the original TRACK_ID field values with those of another field.

Parameters

Geometry Configuration

ParameterDescriptionData Type

Input Layer

The features for which the fields will be mapped to a new schema.

Features

Geometry Expression

The expression containing a Point, Multipoint, Polyline, or Polygon Arcade function.

The function should contain a valid Esri Geometry Object.

Note:

If the spatial reference of the input schema is not specified (tabular data) or any spatial reference other than GCS WGS 1984 (WKID: 4326), the spatial reference must be specified in the Arcade expression in order to evaluate successfully. Otherwise the interface will display Execution Error: Cannot create Geometry in this Spatial Reference. Engine is using a different spatial reference.

Example Arcade expressions to build geometry:

  • Generate point geometry using existing latitude and longitude fields in the feature schema.
    • Point({"x" : $feature.longitude, "y" : $feature.latitude, "spatialReference" : {"wkid" : 4326}})
  • Generate polyline geometry using existing latitude and longitude fields in the feature schema.
    • Polyline({"paths":[[[$feature.longitude,$feature.latitude],[$feature.longitude+5000,$feature.latitude+5000]]],"spatialReference":{"wkid":102100}})

String

Spatial Reference

The spatial reference of the geometry produced by the geometry expression. This can be provided as a WKID or as a WKT string.

The spatial reference specified here must match the spatial reference of the Esri Geometry Object if specified in the expression.

JSON WKID or WKT object

Attribute Field Mapping

ParameterDescriptionData Type

Input Layer

The features for which the fields will be mapped to a new schema.

Features

Input Field

The schema of the data received by the tool. For each entry in the list of input fields, map from an existing field in the input layer or build an Arcade expression to calculate a new value to be written to the designated Output Field.

String

Output Field

The schema of the data after being transformed by the tool.

String

Key Field

Identify the key field(s) to tag fields with their function, if applicable.

String

Output layer

The output layer will have the schema as defined by the list of output fields. If geometry was configured, the geometry will change per the specified geometry expression and spatial reference.