-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#703 Add maximum length for generated segment id fields.
- Loading branch information
Showing
13 changed files
with
105 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"type":"struct","fields":[{"name":"File_Id","type":"integer","nullable":false,"metadata":{}},{"name":"Record_Id","type":"long","nullable":false,"metadata":{}},{"name":"Record_Byte_Length","type":"integer","nullable":false,"metadata":{}},{"name":"Seg_Id0","type":"string","nullable":true,"metadata":{}},{"name":"Seg_Id1","type":"string","nullable":true,"metadata":{}},{"name":"SEGMENT_ID","type":"string","nullable":true,"metadata":{"maxLength":5}},{"name":"COMPANY_ID","type":"string","nullable":true,"metadata":{"maxLength":10}},{"name":"STATIC_DETAILS","type":{"type":"struct","fields":[{"name":"COMPANY_NAME","type":"string","nullable":true,"metadata":{"maxLength":15}},{"name":"ADDRESS","type":"string","nullable":true,"metadata":{"maxLength":25}},{"name":"TAXPAYER","type":{"type":"struct","fields":[{"name":"TAXPAYER_TYPE","type":"string","nullable":true,"metadata":{"maxLength":1}},{"name":"TAXPAYER_STR","type":"string","nullable":true,"metadata":{"maxLength":8}},{"name":"TAXPAYER_NUM","type":"integer","nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}},{"name":"CONTACTS","type":{"type":"struct","fields":[{"name":"PHONE_NUMBER","type":"string","nullable":true,"metadata":{"maxLength":17}},{"name":"CONTACT_PERSON","type":"string","nullable":true,"metadata":{"maxLength":28}}]},"nullable":true,"metadata":{}}]} | ||
{"type":"struct","fields":[{"name":"File_Id","type":"integer","nullable":false,"metadata":{}},{"name":"Record_Id","type":"long","nullable":false,"metadata":{}},{"name":"Record_Byte_Length","type":"integer","nullable":false,"metadata":{}},{"name":"Seg_Id0","type":"string","nullable":true,"metadata":{"maxLength":51}},{"name":"Seg_Id1","type":"string","nullable":true,"metadata":{"maxLength":51}},{"name":"SEGMENT_ID","type":"string","nullable":true,"metadata":{"maxLength":5}},{"name":"COMPANY_ID","type":"string","nullable":true,"metadata":{"maxLength":10}},{"name":"STATIC_DETAILS","type":{"type":"struct","fields":[{"name":"COMPANY_NAME","type":"string","nullable":true,"metadata":{"maxLength":15}},{"name":"ADDRESS","type":"string","nullable":true,"metadata":{"maxLength":25}},{"name":"TAXPAYER","type":{"type":"struct","fields":[{"name":"TAXPAYER_TYPE","type":"string","nullable":true,"metadata":{"maxLength":1}},{"name":"TAXPAYER_STR","type":"string","nullable":true,"metadata":{"maxLength":8}},{"name":"TAXPAYER_NUM","type":"integer","nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}},{"name":"CONTACTS","type":{"type":"struct","fields":[{"name":"PHONE_NUMBER","type":"string","nullable":true,"metadata":{"maxLength":17}},{"name":"CONTACT_PERSON","type":"string","nullable":true,"metadata":{"maxLength":28}}]},"nullable":true,"metadata":{}}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"type":"struct","fields":[{"name":"File_Id","type":"integer","nullable":false,"metadata":{}},{"name":"Record_Id","type":"long","nullable":false,"metadata":{}},{"name":"Record_Byte_Length","type":"integer","nullable":false,"metadata":{}},{"name":"Seg_Id0","type":"string","nullable":true,"metadata":{}},{"name":"Seg_Id1","type":"string","nullable":true,"metadata":{}},{"name":"SEGMENT_ID","type":"string","nullable":true,"metadata":{"maxLength":5}},{"name":"COMPANY_ID","type":"string","nullable":true,"metadata":{"maxLength":10}},{"name":"STATIC_DETAILS","type":{"type":"struct","fields":[{"name":"COMPANY_NAME","type":"string","nullable":true,"metadata":{"maxLength":15}},{"name":"ADDRESS","type":"string","nullable":true,"metadata":{"maxLength":25}},{"name":"TAXPAYER","type":{"type":"struct","fields":[{"name":"TAXPAYER_TYPE","type":"string","nullable":true,"metadata":{"maxLength":1}},{"name":"TAXPAYER_STR","type":"string","nullable":true,"metadata":{"maxLength":8}},{"name":"TAXPAYER_NUM","type":"integer","nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}},{"name":"CONTACTS","type":{"type":"struct","fields":[{"name":"PHONE_NUMBER","type":"string","nullable":true,"metadata":{"maxLength":17}},{"name":"CONTACT_PERSON","type":"string","nullable":true,"metadata":{"maxLength":28}}]},"nullable":true,"metadata":{}}]} | ||
{"type":"struct","fields":[{"name":"File_Id","type":"integer","nullable":false,"metadata":{}},{"name":"Record_Id","type":"long","nullable":false,"metadata":{}},{"name":"Record_Byte_Length","type":"integer","nullable":false,"metadata":{}},{"name":"Seg_Id0","type":"string","nullable":true,"metadata":{"maxLength":51}},{"name":"Seg_Id1","type":"string","nullable":true,"metadata":{"maxLength":51}},{"name":"SEGMENT_ID","type":"string","nullable":true,"metadata":{"maxLength":5}},{"name":"COMPANY_ID","type":"string","nullable":true,"metadata":{"maxLength":10}},{"name":"STATIC_DETAILS","type":{"type":"struct","fields":[{"name":"COMPANY_NAME","type":"string","nullable":true,"metadata":{"maxLength":15}},{"name":"ADDRESS","type":"string","nullable":true,"metadata":{"maxLength":25}},{"name":"TAXPAYER","type":{"type":"struct","fields":[{"name":"TAXPAYER_TYPE","type":"string","nullable":true,"metadata":{"maxLength":1}},{"name":"TAXPAYER_STR","type":"string","nullable":true,"metadata":{"maxLength":8}},{"name":"TAXPAYER_NUM","type":"integer","nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}},{"name":"CONTACTS","type":{"type":"struct","fields":[{"name":"PHONE_NUMBER","type":"string","nullable":true,"metadata":{"maxLength":17}},{"name":"CONTACT_PERSON","type":"string","nullable":true,"metadata":{"maxLength":28}}]},"nullable":true,"metadata":{}}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"type":"struct","fields":[{"name":"File_Id","type":"integer","nullable":false,"metadata":{}},{"name":"Record_Id","type":"long","nullable":false,"metadata":{}},{"name":"Record_Byte_Length","type":"integer","nullable":false,"metadata":{}},{"name":"Seg_Id0","type":"string","nullable":true,"metadata":{}},{"name":"SEGMENT_ID","type":"string","nullable":true,"metadata":{"maxLength":5}},{"name":"COMPANY_ID","type":"string","nullable":true,"metadata":{"maxLength":10}},{"name":"STATIC_DETAILS","type":{"type":"struct","fields":[{"name":"COMPANY_NAME","type":"string","nullable":true,"metadata":{"maxLength":15}},{"name":"ADDRESS","type":"string","nullable":true,"metadata":{"maxLength":25}},{"name":"TAXPAYER","type":{"type":"struct","fields":[{"name":"TAXPAYER_TYPE","type":"string","nullable":true,"metadata":{"maxLength":1}},{"name":"TAXPAYER_STR","type":"string","nullable":true,"metadata":{"maxLength":8}},{"name":"TAXPAYER_NUM","type":"integer","nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}},{"name":"CONTACTS","type":{"type":"struct","fields":[{"name":"PHONE_NUMBER","type":"string","nullable":true,"metadata":{"maxLength":17}},{"name":"CONTACT_PERSON","type":"string","nullable":true,"metadata":{"maxLength":28}}]},"nullable":true,"metadata":{}}]} | ||
{"type":"struct","fields":[{"name":"File_Id","type":"integer","nullable":false,"metadata":{}},{"name":"Record_Id","type":"long","nullable":false,"metadata":{}},{"name":"Record_Byte_Length","type":"integer","nullable":false,"metadata":{}},{"name":"Seg_Id0","type":"string","nullable":true,"metadata":{"maxLength":51}},{"name":"SEGMENT_ID","type":"string","nullable":true,"metadata":{"maxLength":5}},{"name":"COMPANY_ID","type":"string","nullable":true,"metadata":{"maxLength":10}},{"name":"STATIC_DETAILS","type":{"type":"struct","fields":[{"name":"COMPANY_NAME","type":"string","nullable":true,"metadata":{"maxLength":15}},{"name":"ADDRESS","type":"string","nullable":true,"metadata":{"maxLength":25}},{"name":"TAXPAYER","type":{"type":"struct","fields":[{"name":"TAXPAYER_TYPE","type":"string","nullable":true,"metadata":{"maxLength":1}},{"name":"TAXPAYER_STR","type":"string","nullable":true,"metadata":{"maxLength":8}},{"name":"TAXPAYER_NUM","type":"integer","nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}},{"name":"CONTACTS","type":{"type":"struct","fields":[{"name":"PHONE_NUMBER","type":"string","nullable":true,"metadata":{"maxLength":17}},{"name":"CONTACT_PERSON","type":"string","nullable":true,"metadata":{"maxLength":28}}]},"nullable":true,"metadata":{}}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"type":"struct","fields":[{"name":"File_Id","type":"integer","nullable":false,"metadata":{}},{"name":"Record_Id","type":"long","nullable":false,"metadata":{}},{"name":"Record_Byte_Length","type":"integer","nullable":false,"metadata":{}},{"name":"Seg_Id0","type":"string","nullable":true,"metadata":{}},{"name":"Seg_Id1","type":"string","nullable":true,"metadata":{}},{"name":"SEGMENT_ID","type":"string","nullable":true,"metadata":{"maxLength":5}},{"name":"COMPANY_ID","type":"string","nullable":true,"metadata":{"maxLength":10}},{"name":"STATIC_DETAILS","type":{"type":"struct","fields":[{"name":"COMPANY_NAME","type":"string","nullable":true,"metadata":{"maxLength":15}},{"name":"ADDRESS","type":"string","nullable":true,"metadata":{"maxLength":25}},{"name":"TAXPAYER","type":{"type":"struct","fields":[{"name":"TAXPAYER_TYPE","type":"string","nullable":true,"metadata":{"maxLength":1}},{"name":"TAXPAYER_STR","type":"string","nullable":true,"metadata":{"maxLength":8}},{"name":"TAXPAYER_NUM","type":"integer","nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}},{"name":"CONTACTS","type":{"type":"struct","fields":[{"name":"PHONE_NUMBER","type":"string","nullable":true,"metadata":{"maxLength":17}},{"name":"CONTACT_PERSON","type":"string","nullable":true,"metadata":{"maxLength":28}}]},"nullable":true,"metadata":{}}]} | ||
{"type":"struct","fields":[{"name":"File_Id","type":"integer","nullable":false,"metadata":{}},{"name":"Record_Id","type":"long","nullable":false,"metadata":{}},{"name":"Record_Byte_Length","type":"integer","nullable":false,"metadata":{}},{"name":"Seg_Id0","type":"string","nullable":true,"metadata":{"maxLength":51}},{"name":"Seg_Id1","type":"string","nullable":true,"metadata":{"maxLength":51}},{"name":"SEGMENT_ID","type":"string","nullable":true,"metadata":{"maxLength":5}},{"name":"COMPANY_ID","type":"string","nullable":true,"metadata":{"maxLength":10}},{"name":"STATIC_DETAILS","type":{"type":"struct","fields":[{"name":"COMPANY_NAME","type":"string","nullable":true,"metadata":{"maxLength":15}},{"name":"ADDRESS","type":"string","nullable":true,"metadata":{"maxLength":25}},{"name":"TAXPAYER","type":{"type":"struct","fields":[{"name":"TAXPAYER_TYPE","type":"string","nullable":true,"metadata":{"maxLength":1}},{"name":"TAXPAYER_STR","type":"string","nullable":true,"metadata":{"maxLength":8}},{"name":"TAXPAYER_NUM","type":"integer","nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}},{"name":"CONTACTS","type":{"type":"struct","fields":[{"name":"PHONE_NUMBER","type":"string","nullable":true,"metadata":{"maxLength":17}},{"name":"CONTACT_PERSON","type":"string","nullable":true,"metadata":{"maxLength":28}}]},"nullable":true,"metadata":{}}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"type":"struct","fields":[{"name":"File_Id","type":"integer","nullable":false,"metadata":{}},{"name":"Record_Id","type":"long","nullable":false,"metadata":{}},{"name":"Record_Byte_Length","type":"integer","nullable":false,"metadata":{}},{"name":"Seg_Id0","type":"string","nullable":true,"metadata":{}},{"name":"SEGMENT_ID","type":"string","nullable":true,"metadata":{"maxLength":5}},{"name":"COMPANY_ID","type":"string","nullable":true,"metadata":{"maxLength":10}},{"name":"STATIC_DETAILS","type":{"type":"struct","fields":[{"name":"COMPANY_NAME","type":"string","nullable":true,"metadata":{"maxLength":15}},{"name":"ADDRESS","type":"string","nullable":true,"metadata":{"maxLength":25}},{"name":"TAXPAYER","type":{"type":"struct","fields":[{"name":"TAXPAYER_TYPE","type":"string","nullable":true,"metadata":{"maxLength":1}},{"name":"TAXPAYER_STR","type":"string","nullable":true,"metadata":{"maxLength":8}},{"name":"TAXPAYER_NUM","type":"integer","nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}},{"name":"CONTACTS","type":{"type":"struct","fields":[{"name":"PHONE_NUMBER","type":"string","nullable":true,"metadata":{"maxLength":17}},{"name":"CONTACT_PERSON","type":"string","nullable":true,"metadata":{"maxLength":28}}]},"nullable":true,"metadata":{}}]} | ||
{"type":"struct","fields":[{"name":"File_Id","type":"integer","nullable":false,"metadata":{}},{"name":"Record_Id","type":"long","nullable":false,"metadata":{}},{"name":"Record_Byte_Length","type":"integer","nullable":false,"metadata":{}},{"name":"Seg_Id0","type":"string","nullable":true,"metadata":{"maxLength":51}},{"name":"SEGMENT_ID","type":"string","nullable":true,"metadata":{"maxLength":5}},{"name":"COMPANY_ID","type":"string","nullable":true,"metadata":{"maxLength":10}},{"name":"STATIC_DETAILS","type":{"type":"struct","fields":[{"name":"COMPANY_NAME","type":"string","nullable":true,"metadata":{"maxLength":15}},{"name":"ADDRESS","type":"string","nullable":true,"metadata":{"maxLength":25}},{"name":"TAXPAYER","type":{"type":"struct","fields":[{"name":"TAXPAYER_TYPE","type":"string","nullable":true,"metadata":{"maxLength":1}},{"name":"TAXPAYER_STR","type":"string","nullable":true,"metadata":{"maxLength":8}},{"name":"TAXPAYER_NUM","type":"integer","nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}}]},"nullable":true,"metadata":{}},{"name":"CONTACTS","type":{"type":"struct","fields":[{"name":"PHONE_NUMBER","type":"string","nullable":true,"metadata":{"maxLength":17}},{"name":"CONTACT_PERSON","type":"string","nullable":true,"metadata":{"maxLength":28}}]},"nullable":true,"metadata":{}}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
spark-cobol/src/main/scala/za/co/absa/cobrix/spark/cobol/parameters/MetadataFields.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright 2018 ABSA Group Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package za.co.absa.cobrix.spark.cobol.parameters | ||
|
||
object MetadataFields { | ||
// Metadata for 'string' | ||
val MAX_LENGTH = "maxLength" | ||
|
||
// Metadata for 'array' | ||
val MIN_ELEMENTS = "minElements" | ||
val MAX_ELEMENTS = "maxElements" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.