Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Allow dynamic binding of "extra" fields into columns with templatized names #51

Open
cowtowncoder opened this issue Oct 6, 2014 · 0 comments

Comments

@cowtowncoder
Copy link
Member

As an alternative to throwing exception on encountering unknown/extra column values; or for just ignorign them, it would be good to be able to simply assign them dynamically generated name like "unknown1", "unknown2" and so on.
Name should be templatizable using String.format(...) with 1-based index; for example to get name mentioned above, one could define template as unknown%d. It would also be legal to specify un-templatized name (no %), which would just use same name; this may or may not work for data-binding, but could be useful when using Streaming API directly.

Configuration should be done by one of:

  1. Specify feature and template via CsvFactory, as baseline to use for all CsvParsers
  2. Specify feature and template on individual CsvParser instances (replaces whatever default was used)
  3. (if supported by ObjectReader/future CsvReader -- separate work items) Allow per-call override via CsvReader instance, to be passed as an override for CsvParser constructed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant