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

Ability to use Avro files defined in other avsc files #137

Open
nmarasoiu opened this issue Jun 23, 2020 · 0 comments
Open

Ability to use Avro files defined in other avsc files #137

nmarasoiu opened this issue Jun 23, 2020 · 0 comments

Comments

@nmarasoiu
Copy link

nmarasoiu commented Jun 23, 2020

When I define certain common Avro types in their own avsc files, and use them by fully qualified name in other Avro definitions (in other avsc files), I get this error:

throw new SchemaParseException(fieldTypeNode + " is not a defined name." + " The type of the "" + fieldName
+ "" field must be" + " a defined name or a {"type": ...} expression.");

I want to go the "defined name" way, but I am not clear how is this possible.

Apache Avro 1.7.3 seemingly introduced the possibility of import, but looking in its code, it does not populate imports, presumably leaving it to implementations like maven/gradle/sbt plugins.

I guess a way is like maven plugin does, allowing configuration of import paths to be done before the others.

Another way is the one proposed in this https://issues.apache.org/jira/browse/AVRO-1188 which is an explicit import at the site of the usage in another avsc.

https://stackoverflow.com/questions/62535519/how-do-i-use-an-avro-type-in-another-avro-type-without-defining-it-again

Can I apply the FileSorter so that the avsc files are parsed in their dependency order? is this a configuration, or a call that i can code? how to hook in the lifecycle?

@nmarasoiu nmarasoiu changed the title Ability to import avsc definitions from one avsc to another avsc Ability to use Avro files defined in other avsc files Jul 7, 2020
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