The Map fields tool transforms a dataset's schema by matching it to a target schema.
Examples
The Map fields tool can be used in scenarios such as the following:
- Update a dataset's schema to be compatible with the feature layer or table to which it will be appended
- Standardize the schema for multiple datasets so they can be merged together
Parameters
The following table outlines the parameters used in the Map fields tool:
Parameter | Description |
---|---|
Input dataset | The dataset containing the fields that will be mapped to the specified schema. |
Field mapping | Maps the input dataset schema to the schema from a hosted feature layer, hosted table, or another dataset in a data pipeline. |
Usage notes
Use the Input dataset parameter to select the dataset containing the fields you want to map to a target schema.
Use the Field mapping parameter to specify the feature layer or dataset to import the target schema from and how to map the input dataset fields to the target fields.
To import target schemas, the following options are available:
- Feature Layer from your content—Browse to a hosted feature layer or table in your content. The selected feature layer or table will not be added to the data pipeline canvas.
- Dataset from this data pipeline—Select another dataset that is currently in your data pipeline canvas.
Use the table on the Map fields dialog box to match input dataset fields to target fields. Fields must be of compatible types to map them. For example, you cannot map a string input field to an integer target field. By default, fields with similar names and compatible types will be automatically matched.
Outputs
The output dataset will contain the fields from the input dataset that were matched to fields from the target schema. Matched input fields will be returned with the names and types of the target field they were mapped to. Unmatched fields will not be available in the output.
If geometry fields are matched and the spatial reference differs, the input geometry will be projected to the spatial reference of the target geometry.
Limitations
The following are known limitations of the Map fields tool:
- If the schema for the target dataset or feature layer changes, the field mapping will not automatically pick up the changes. To pick up changes in target schemas, delete the current field mapping and import the target schema again.
- The tool does not cast field values. For example, you cannot match a double field to a string field. To cast fields, use the Update fields tool.
- To match complex field types—such as array, map, and struct—the input and target fields must contain keys and value types that match exactly. For example, if an input array field contains integer values, it cannot be matched to a target array field that contains string values.
Licensing requirements
The following licensing and configurations are required:
- Creator or Professional user type
- Publisher, Facilitator, or Administrator role, or an equivalent custom role
To learn more about Data Pipelines requirements, see Requirements.