Available in real-time and big data analytics.
The Map Fields tool transforms data from an input schema to an output schema. You can perform field calculations, create fields, and tag key fields with the Map Fields tool.
Fields are mapped using ArcGIS Arcade expressions. Arcade is a lightweight and secure expression language written for use in ArcGIS. It can perform mathematical calculations and evaluate logical statements like other expression languages.
Learn more about ArcGIS Arcade expression language
Examples
The following are example uses of the Map Fields tool:
- 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 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 fields and set these values as feature geometry.
Usage notes
Keep the following in mind when working with the Map Fields tool:
- 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. If a field is designated as Int64, that field is converted to Float64 and listed as type Double in any associated map or feature services.
- Data fields with the Int64 type, before they are converted, support whole numbers between -(2 53) -1 and (2 53) -1. Attempting to read or write numbers outside this range can result in rounding of the value.
- As an alternative to the Map Fields tool, you can set field name modification and key field tagging when first configuring a source or feed.
- In real-time analytics , do not remove the TRACK_ID field name tag from a feed, as that will invalidate it. As a best practice, when changing the field tagged with the track ID field name, ensure that the new track ID field name is incorporates the original track ID field values. For example, you can create a new field containing a concatenation of the original track ID field values with those of another field.
- Geometry calculation with this tool is currently restricted to the Well-known ID (WKID) spatial reference. The Well-known text (WKT) spatial reference is not supported by the Arcade geometry function.
Parameters
The following are the parameters for the Map Fields tool:
Attribute Field Mapping (New Field Mapping)
Parameter | Description | Data type |
---|---|---|
Input layer | The features for which the fields are 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 parameter. | String |
Output field | The schema of the data after being transformed by the tool. | String |
Key field (optional) | Identify the key fields to tag fields with their function, if applicable. | String |
Nullable | Indicates whether the mapped field can contain null values. This parameter is represented as a check box. | Boolean |
Geometry Configuration
Parameter | Description | Data type |
---|---|---|
Input layer | The features for which the fields are 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) is used, the spatial reference must be specified in the Arcade expression to evaluate successfully. Otherwise, the following error appears Execution Error: Cannot create Geometry in this Spatial reference. Engine is using a different spatial reference. Example Arcade expressions to build geometry are as follows:
| 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 |
Output layer
The output layer has the schema defined by the list of output fields. If geometry is configured, the geometry changes per the specified geometry expression and spatial reference.