FieldSelection is used in conjunction with the
JacksonRecordReader
(and the subclasses).
The are a few motivations here:
- Formats such as XML, JSON and YAML can contain arbitrarily nested components, and we need to flatten them somehow
- These formats can vary in terms of order (for example, JSON is unordered), so we need to define the exact order of outputs for the record reader
- In any given JSON/XML/YAML file, there might not be a particular value present (but: we still want it to be represented in the output)
- In any given JSON/XML/YAML file, we might want to totally ignore certain fields