Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#666 Add support for record length value mapping #674

Merged
merged 4 commits into from
Apr 22, 2024

Conversation

yruslan
Copy link
Collaborator

@yruslan yruslan commented Apr 22, 2024

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)

Copy link

JaCoCo code coverage report - 'cobol-parser'

File Coverage [64.74%] 🍏
RecordLengthField.scala 100% 🍏
ReaderParametersValidator.scala 73.33% 🍏
VarLenNestedReader.scala 71.5% 🍏
VRLRecordReader.scala 56.72% 🍏
Total Project Coverage 85.58% 🍏

Copy link

JaCoCo code coverage report - 'spark-cobol'

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

@yruslan yruslan marked this pull request as ready for review April 22, 2024 14:40
@yruslan yruslan merged commit 880b567 into master Apr 22, 2024
7 checks passed
@yruslan yruslan deleted the feature/666-record-length-value-mapping branch April 22, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant