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

Allow specifying expressions for record size #569

Closed
yruslan opened this issue Jan 19, 2023 · 0 comments
Closed

Allow specifying expressions for record size #569

yruslan opened this issue Jan 19, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@yruslan
Copy link
Collaborator

yruslan commented Jan 19, 2023

Background

This is an idea that instead of defining a record length column it sometimes could be useful to define a record length expression based on a column ore more than one column.

Feature

A description of the requested feature.

Proposed Solution

      01  R.
                03 RECORD-LEN        PIC 9(3).
                03 FIELDS                    PIC X(100).
      val df = spark.read
        .format("cobol")
        .option("copybook_contents", copyBook)
        .option("record_format", "F")
        .option("record_length_expresion", "500 + @RECORD_LEN * 10")
        .load(filePath)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant