AbsaOSS / cobrix

A COBOL parser and Mainframe/EBCDIC data source for Apache Spark
Apache License 2.0
138 stars 78 forks source link

#666 Add support for record length value mapping #674

Closed yruslan closed 6 months ago

yruslan commented 6 months ago

Example:

val df = spark.read
  .format("cobol")
  .option("copybook_contents", copybook)
  .option("record_format", "F")
  .option("record_length_field", "SEG-ID")
  .option("record_length_map", """{"A":4,"B":7,"C":8}""") // <---- this
  .load(tempFile)
github-actions[bot] commented 6 months ago

JaCoCo code coverage report - 'cobol-parser'

File Coverage [64.74%] :green_apple:
RecordLengthField.scala 100% :green_apple:
ReaderParametersValidator.scala 73.33% :green_apple:
VarLenNestedReader.scala 71.5% :green_apple:
VRLRecordReader.scala 56.72% :green_apple:
Total Project Coverage 85.58% :green_apple:
github-actions[bot] commented 6 months ago

JaCoCo code coverage report - 'spark-cobol'

File Coverage [84.75%] :green_apple:
CobolParametersParser.scala 84.94% :green_apple:
CobolScanners.scala 82.56% :green_apple:
Total Project Coverage 80.22% :green_apple: