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

Need support for multiple schemas within an input directory #12

Open
kkrugler opened this issue Aug 21, 2013 · 1 comment
Open

Need support for multiple schemas within an input directory #12

kkrugler opened this issue Aug 21, 2013 · 1 comment

Comments

@kkrugler
Copy link
Member

It is possible to have multiple Avro Schemas present within the same input directory. Usually this occurs when the data format changes over time. Need to have a utility method to create a pipe which can read multiple schemas (probably as a multi-tap). Also, need to return fields and data types as a normalized union of the two schemas, using the following rules:

  1. If data types of the fields do not conflict, simply take the union of the fields and data types of all input Schemas.
  2. If the data types conflict, but can be promoted, then promote them (i.e. int -> long, float -> double, int -> double).
  3. Otherwise, convert conflicting data types to String (when converting BytesWritable to String, use Hex)
@kkrugler
Copy link
Member Author

I think I'd have a requirement like the scheme names have to match, or at least share a prefix, so that you don't wind up with crazy results if you accidentally mix in a file with a completely different scheme.

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