There's more...

JacksonRecordReader is a record reader that uses the Jackson API. Just like JacksonLineRecordReader, it also supports JSON, XML, and YAML formats. For JacksonRecordReader, the user needs to provide a list of fields to read from the JSON/XML/YAML file. This may look complicated, but it allows us to parse the files under the following conditions:

  • There is no consistent schema for the JSON/XML/YAML data. The order of output fields can be provided using the FieldSelection object.
  • There are fields that are missing in some files but that can be provided using the FieldSelection object.

 JacksonRecordReader can also be used with PathLabelGenerator to append the label based on the file path.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset