File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
spark-cobol/src/main/scala/za/co/absa/cobrix/spark/cobol/parameters Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,8 @@ object CobolParametersParser extends Logging {
113
113
val PARAM_RHP_ADDITIONAL_INFO = " rhp_additional_info"
114
114
val PARAM_RE_ADDITIONAL_INFO = " re_additional_info"
115
115
val PARAM_INPUT_FILE_COLUMN = " with_input_file_name_col"
116
+ val PARAM_SEGMENT_REDEFINE_PREFIX = " redefine_segment_id_map"
117
+ val PARAM_SEGMENT_REDEFINE_PREFIX_ALT = " redefine-segment-id-map"
116
118
117
119
// Indexed multisegment file processing
118
120
val PARAM_ENABLE_INDEXES = " enable_indexes"
@@ -637,12 +639,12 @@ object CobolParametersParser extends Logging {
637
639
params.getMap.flatMap {
638
640
case (k, v) =>
639
641
val keyNoCase = k.toLowerCase
640
- if (keyNoCase.startsWith(" redefine-segment-id-map " ) ||
641
- keyNoCase.startsWith(" redefine_segment_id_map " )) {
642
+ if (keyNoCase.startsWith(PARAM_SEGMENT_REDEFINE_PREFIX ) ||
643
+ keyNoCase.startsWith(PARAM_SEGMENT_REDEFINE_PREFIX_ALT )) {
642
644
params.markUsed(k)
643
645
val splitVal = v.split(" \\ =\\ >" )
644
646
if (splitVal.lengthCompare(2 ) != 0 ) {
645
- throw new IllegalArgumentException (s " Illegal argument for the 'redefine-segment-id-map ' option: ' $v'. " )
647
+ throw new IllegalArgumentException (s " Illegal argument for the ' $PARAM_SEGMENT_REDEFINE_PREFIX_ALT ' option: ' $v'. " )
646
648
}
647
649
val redefine = splitVal(0 ).trim
648
650
val segmentIds = splitVal(1 ).split(',' ).map(_.trim)
You can’t perform that action at this time.
0 commit comments