...
In csv translation, the right side of the '=' is the column name in the csv whereas the left side is the system properly name.
...
02. User Integrator Configuration
Now we need to configure the UserIntegratorConfigFile.json file which contains the configuration of how imported data will be processed. This file has 10 different section for different purposes.
...
[
{
"SourceValue": "Capt.",
"TargetValue": "Captain"
},
{
"SourceValue": "Captain",
"TargetValue": "Captain"
},
{
"SourceValue": "1st Eng.",
"TargetValue": "First Engineer"
},
{
"SourceValue": "2nd Eng.",
"TargetValue": "Second Engineer"
}
]
DataSanitationConfiguration
Sample Configuration:
"DataSanitationConfiguration": {
"FieldsToSanitize": [
{
"FieldName": "DeptCode",
"ReduceToSingleWhiteSpace": "true",
"SanitizeValues": [
{
"Original": "XT",
"Replacement": "xt"
},
{
"Original": ",",
"Replacement": "+"
}
]
}
]
}
The user importer can configure OPFs/user properties which need to be ‘sanitized’. Other than this there are few sanitization rules which are applied by default.
FieldName: The name of the field to be sanitized.
ReduceToSingleWhiteSpace: If this value is true, multiple white spaces will be trimmed to single whitespace. (i.e “Mobile Phone“ => “Mobile Phone“)
SanitizeValues: It contains the original and replacement values for the field.
ResetFieldsToDefaultIfEmptyConfiguration
Sample Configuration
Code Block | ||
---|---|---|
| ||
"ResetFieldsToDefaultIfEmptyConfiguration": {
"ResetFieldsToDefaultIfEmpty": [
"Vessel",
"Rank",
"EmbarkmentDate"
]
} |
If any user property is not provided or provided as empty and that property is added in this ResetFieldsToDefaultIfEmpty array, it sets default value for that property depending on the data type.