Configuring a data transform for a JSON output mapping
Support a machine learning service connection to external topic detection models by converting the JSON response from the prediction endpoint to a format that Pega Platform accepts.
The output mapping is based on the structure of the Data-NLP-Outcome class.
- In the header of Dev Studio, click .
- In the Label field, enter a short description for your data transform.
- In the Additional configuration options section, select Clipboard.
- In the Context section, specify the context for your data
transform:
- In the Apply to field, enter Data-NLP-ExternalMapping.
- In the Add to ruleset field, select the name of a ruleset to contain the record, and then select the version number from the list.
- Click Create and open.
- On the Definition tab, map the properties in the
Data-NLP-Outcome class to the paths in the JSON
response.
Use the following actions, target properties, and source properties for the mapping:
Choices Actions Specify an array in the JSON response Use the Append and Map to action to map the .pxResults target property to a path in the JSON response as the source. Enter the path in a format that follows the JSON Pointer specification but without a slash (/) prefix. Specify a path in the JSON response Use the Set action to map the .pySource_jsonPath target property to a path in the JSON response as the source. Enter the path in a format that follows the JSON Pointer specification but without a slash (/) prefix. Examples:
classification/score displayName Specify a property in the Data-NLP-Outcome class Use the Set action to map the .pyDestination_property target property to a property in the Property in the Data-NLP-Outcome class as the source. Examples:
.pyTopics .pyName .pyConfidenceScore Enter the path in a format that follows the JSON Pointer specification but without a slash (/) prefix. For more information, see JSON Pointer specification and Configuring a data transform. - Click Save.
Previous topic Configuring a machine learning service connection for topic detection models using REST API Next topic Creating a text categorization model to run topic detection models through an API