Interface TextRecordDiscoverer

All Known Implementing Classes:
JsonPatternBasedDiscovery, PatternBasedDiscovery

public interface TextRecordDiscoverer
A generator of text record schemas. A TextRecordDiscoverer can be used with delimited text data to produce schemas for reading and writing.
  • Method Details

    • discoverForRead

      TextRecord discoverForRead(List<List<String>> rows, boolean containsHeader, TextConversionDefaults defaults)
      Constructs a schema for reading based on the given file analysis. The analysis may or may not include a header row, as indicated.
      Parameters:
      rows - the analyzed rows from a text file
      containsHeader - indicates whether the first row of the analyzed file is a header
      defaults - defaults for the discovered schema
      Returns:
      a schema appropriate for reading the file.
    • generateForWrite

      TextRecord generateForWrite(RecordTokenType recordTokenType, TextConversionDefaults defaults)
      Constructs a schema for writing based on the given record type.
      Parameters:
      recordTokenType - the record type of the data
      defaults - defaults for the discovered schema
      Returns:
      a schema appropriate for writing data of the given type