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

Leveraging copybookparser in java #315

Closed
ghost opened this issue Aug 5, 2020 · 9 comments
Closed

Leveraging copybookparser in java #315

ghost opened this issue Aug 5, 2020 · 9 comments
Labels
accepted Accepted for implementation question Further information is requested

Comments

@ghost
Copy link

ghost commented Aug 5, 2020

I want to use below copybookparser for retrieving sparksql schemas in java.

val parsedSchema = CopybookParser.parseTree(copyBookContents)

in Java its expecting all the parameters for parseTree function. Please let me know how to resolve it using java code

@ghost ghost added the question Further information is requested label Aug 5, 2020
@yruslan
Copy link
Collaborator

yruslan commented Aug 6, 2020

New versions of Cobrix have CopybookParser.parse() method. Try using it. The only mandatory parameter is cookbook content.

@ghost
Copy link
Author

ghost commented Aug 6, 2020

We tried with V2.1.0, but still its expecting all the parameters.

@yruslan yruslan added the accepted Accepted for implementation label Aug 7, 2020
@yruslan
Copy link
Collaborator

yruslan commented Aug 7, 2020

I can implement something line parseSimple() that would require parameters that affect only copybook format and AST structure. Could I ask you to post the piece of code you use to parse a copybook now? I want to double-check the values that you pass.

@ghost
Copy link
Author

ghost commented Aug 7, 2020

I am just trying to provide only copybook content as the parameter so that i can get the parsed schema.

yruslan added a commit that referenced this issue Aug 10, 2020
…l arguments.

These arguments are essential to the parser as they describe properties of the copybook and
output AST structure.
@yruslan
Copy link
Collaborator

yruslan commented Aug 10, 2020

Will add parseSimple() that will require just a couple of arguments that are copybook and AST-related.

@ghost
Copy link
Author

ghost commented Aug 10, 2020

Thanks sure.

yruslan added a commit that referenced this issue Aug 11, 2020
yruslan added a commit that referenced this issue Aug 12, 2020
…l arguments.

These arguments are essential to the parser as they describe properties of the copybook and
output AST structure.
yruslan added a commit that referenced this issue Aug 12, 2020
@ghost
Copy link
Author

ghost commented Aug 18, 2020

Its already released but didnt find it in Maven. Is it going to deploy to maven once the pr #321 is approved and merged.

@yruslan
Copy link
Collaborator

yruslan commented Aug 18, 2020

It's already deployed. We merge release PRs when we see the artifact on Maven Central.
It is there already: https://search.maven.org/artifact/za.co.absa.cobrix/spark-cobol_2.11/2.1.1/jar

@yruslan yruslan closed this as completed Aug 18, 2020
@ghost
Copy link
Author

ghost commented Aug 18, 2020

its my bad, there was a typo on my end while i procure it in our space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Accepted for implementation question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant