Giter Club home page Giter Club logo

Comments (3)

yruslan avatar yruslan commented on May 27, 2024

Yeah, this is a side effect of a known issue. Currently the parser is structured in a way that i threats root nodes differently form nested nodes. There is no reason for this. We definitely need to fix it at some point. It might take more time than the other issues, but luckily there is a workaround.

from cobrix.

tr11 avatar tr11 commented on May 27, 2024

I tried to add this feature in this branch, but it seems to trip on the segmentRedefines. Right now it seems that for a FixedLenReader there is no way to pass in those redefines.
The result is a successfully parsed schema that reflects the first copybook above, but the reader then proceeds to ignore the Redefined fields due to the isSegmentRedefine property.

from cobrix.

yruslan avatar yruslan commented on May 27, 2024

I think you've done some really good work here. Thanks a lot! Feel free to create a PR. Will be happy to review and merge. Yes, switching AST from Seq[Group] to Group is exactly what I had in mind.

The segment redefines are currently supported only for variable record length files since it was expected that multisegment files have always variable record length. If your use case is different, this is a separate issue, we can implement it as well. I'm going to create a placeholder issue for that.

For now you can try workaround it by adding .option("generate_record_id", true). This will trigger the variable record length reader since records become order-dependent. Please let me know if it works.

from cobrix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.