MappingStats
With the MappingStats REST API, you can view basic mapping statistics, such as the name and time taken for the job for mappings that run in the native or Hadoop environment.
GET Request
To request information from the MappingStats, use the following URL:
<RESTOperationsHubService_Host>:<RESTOperationsHubService_Port>/RestOperationsHub/services/v1/MappingService/MappingStats('jobId')
The following table describes the attributes in the MappingStats Get URL:
Field | Type | Description |
|---|
userName | String | Required. User name to connect to the domain. You can pass the input value as a header. |
encryptedpassword | String | Required. Password for the user. Encrypt the password with the pmpasswd command line program. You can pass the input value as a header. |
securityDomain | String | Optional. The security domain to which the domain user belongs. You can pass the input value as a header. Default is Native. |
jobId | String | Required. The argument of the entity that contains the ID for the mappings. You can pass the property as part of the URL. |
Get Response
Return information for the MappingStats for the specified Job ID.
The following table describes the MappingStats attributes present in the body of the response on the native or Hadoop environment:
Field | Type | Description |
|---|
jobId | String | The argument of the entity that contains the ID for the mapping. |
mappingDetails | n/a | Container for mapping run information, such as mapping name, start time, and end time. |
status | String | State of the job run. |
mappingName | String | Name of the mapping. |
applicationName | String | Name of the application. |
serviceName | String | Name of the service. |
logFileName | String | Location of the log file. |
startTime | Integer | Start time of the job. |
endTime | Integer | End time of the job. |
executorType | String | Type of the run-time environment where you run the mapping. |
executingNode | String | The Data Integration Service node where the job ran. |
userName | String | User who started the job. |
securityDomain | String | The security domain to which the domain user belongs. |
Sample Retrieve Mapping Statistics
The sample use case is to use the script to retrieve the details of the mapping statistics on the Spark environment.
You can use the REST API to retrieve information about the mapping statistics with the following request URL for a mapping with Job ID as _TNoO9ELEeiimY76kFyfuw:
<RESTOperationsHubService_Host>:<RESTOperationsHubService_Port>/RestOperationsHub/services/v1/MappingService/MappingStats('_TNoO9ELEeiimY76kFyfuw')
Mapping Statistics Output
{
"@odata.context": "$metadata#MappingStats/$entity",
"jobId": "_TNoO9ELEeiimY76kFyfuw",
"mappingDetails": {
"status": "COMPLETED",
"mappingName": "HDFSTgtAppend_MultiPartition_SparkMode",
"applicationName": "HDFSTargetAppend",
"serviceName": "DIS_HDP_2.6",
"logFileName": "/data/Informatica/10.2.2_252/logs/node252/services/DataIntegrationService/disLogs/ms/DEPLOYED_MAPPING_HDFSTargetAppend_HDFSTgtAppend_MultiPartition_SparkMode-_TNoO9ELEeiimY76kFyfuw_20181016_115325_006.log",
"startTime": 1539671005830,
"endTime": 1539671244752,
"executorType": "SPARK",
"executingNode": "node252",
"userName": "Administrator",
"securityDomain": "Native"
}
}