Transformations > Machine Learning transformation > Mapping fields to the request schema
  

Mapping fields to the request schema

Map incoming fields to request schema fields on the Request Mapping tab. The Machine Learning transformation uses the request schema fields to send data to the machine learning model at the REST endpoint.
The request schema fields come from the request schema in the REST API request from the API collection. The working field name is the key that the Machine Learning transformation passes in the REST API request. If the REST API can't process a special character in the field name, the working field name replaces the special character. For example, underscores are replaced with a period character (.).
The names of incoming fields and request schema fields can differ, but the data types and hierarchies must match. All request schema fields must have a mapped field, even if the fields are not mandatory in the REST API.
Note that only parent fields appear in the request mapping. To review child fields, refer to the incoming fields in the Machine Learning transformation and the request schema fields in the API collection.

Mapping hierarchical fields

To map hierarchical fields in the request mapping, the hierarchies of the incoming fields and request schema fields must match.
For example, the following image shows a request schema in an API collection:
An API collection has a request schema that contains two structs. The first struct represents a full name with first name and last name elements. The following struct represents an address with state, place, and ZIP code elements.
The following image shows incoming fields in a Machine Learning transformation with a hierarchy that matches the request schema:
The Incoming Fields tab is selected in a Machine Learning transformation. The tab lists two structs. The first struct represents a full name with first name and last name elements. The following struct represents an address with state, place, and ZIP code elements.
The following image shows the request mapping between the incoming fields and the request schema fields:
The Request Mapping tab is selected in a Machine Learning transformation. The Incoming Fields side contains two structs that represent a full name and an address, respectively. The incoming fields are mapped to corresponding structs on the Request Schema Fields side.
If the hierarchies don't match, use a Hierarchy Processor transformation before the Machine Learning transformation to restructure the incoming data according to the request schema fields. For more information, see Hierarchy Processor transformation overview.

Request mapping options

Configure request mapping options to define how incoming fields are mapped to request schema fields.
You can configure the following request mapping options:
Field Map Options
Method to map fields to the target. Use one of the following options:
Parameter
Parameter to use for the field mapping.
New Parameter
Creates a field mapping parameter.
Show Fields
Controls the fields that appear in the Incoming Fields list. Show all fields, unmapped fields, or mapped fields.
Automap
Links fields with matching names. Allows you to link matching fields, and then manually configure other field mappings.
You can map fields in the following ways:
You can use both Exact Field Name and Smart Map in the same field mapping. For example, use Exact Field Name to match fields with the same name and then use Smart Map to map fields with similar names.
You can undo all automapped field mappings by clicking Automap > Undo Automap. To unmap a single field, select the field to unmap and click Actions > Unmap.
Data Integration highlights newly mapped fields. For example, when you use Exact Field Name, Data Integration highlights the mapped fields. If you then use Smart Map, Data Integration only highlights the fields mapped using Smart Map.
Action menu
Additional field link options. Provides the following options:
Show
Determines how field names appear in the target fields list. Use technical field names or labels.