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

Clarify error message when a copybook is not specified #293

Closed
yruslan opened this issue May 25, 2020 · 0 comments
Closed

Clarify error message when a copybook is not specified #293

yruslan opened this issue May 25, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@yruslan
Copy link
Collaborator

yruslan commented May 25, 2020

Describe the bug

Currently, if neither a copybook nor copybook contents are specified, spark-cobol will fail with the following error message:

Exception in thread "main" java.lang.IllegalStateException: Cannot define path to source files: missing parameter: 'path'
	at za.co.absa.cobrix.spark.cobol.source.parameters.CobolParametersValidator$.validateOrThrow(CobolParametersValidator.scala:97)
	at za.co.absa.cobrix.spark.cobol.source.DefaultSource.createRelation(DefaultSource.scala:52)
	at za.co.absa.cobrix.spark.cobol.source.DefaultSource.createRelation(DefaultSource.scala:48)
	at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:318)

To Reproduce

    val df = spark
      .read
      .format("cobol")
      .load("/path/file")

Expected behaviour

The error message should say clearly that a copybook is missing.

@yruslan yruslan added the bug Something isn't working label May 25, 2020
@yruslan yruslan self-assigned this May 25, 2020
@yruslan yruslan closed this as completed Jun 12, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant