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

org.apache.avro.SchemaParseException: "com.ovoenergy.global.SourceMetadata" is not a defined name #81

Open
nicolaemarasoiu opened this issue Jun 22, 2020 · 2 comments

Comments

@nicolaemarasoiu
Copy link

Hi,
We have an avsc file that defines com.ovoenergy.global.SourceMetadata and indeed after sbt compile i can notice the generated Scala case class com.ovoenergy.global.SourceMetadata.
Is there a way to import an avsc into an avsc or somehow inform the dependency?
Thank you
org.apache.avro.SchemaParseException: "com.ovoenergy.global.SourceMetadata" is not a defined name. The type of the "sourceMetadata" field must be a defined name or a {"type": ...} expression.
at org.apache.avro.Schema.parse(Schema.java:1637)
at org.apache.avro.Schema$Parser.parse(Schema.java:1396)
at org.apache.avro.Schema$Parser.parse(Schema.java:1367)

@nicolaemarasoiu nicolaemarasoiu changed the title org.apache.avro.SchemaParseException: "com.ovoenergy.global.SourceMetadata" is not a defined name. The type of the "sourceMetadata" field must be a defined name or a {"type": ...} expression. at org.apache.avro.Schema.parse(Schema.java:1637) at org.apache.avro.Schema$Parser.parse(Schema.java:1396) at org.apache.avro.Schema$Parser.parse(Schema.java:1367) org.apache.avro.SchemaParseException: "com.ovoenergy.global.SourceMetadata" is not a defined name Jun 22, 2020
@nicolaemarasoiu
Copy link
Author

the apache avro is 1.9.1
i use this in avsc, tried it in few places:
"imports": ["commonSourceMetadata3.avsc"],

@nicolaemarasoiu
Copy link
Author

ok, the imports statement is only supported in Avro IDL.
However, the Maven Avro plugin does offer support for declaring a set of avsc files available to other ones that just need to reference the imported/common definitions by name.
Also I know AvroHugger has a method to sort files by dependencies, is it possible to have a feature, to which i can contribute if possible, that just calls that method in a lifecycle point?

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

No branches or pull requests

1 participant